This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "$USER ALL=(ALL:ALL) NOPASSWD: ALL" | sudo env EDITOR="tee -a" visudo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -sSL https://get.docker.com | sh && sudo usermod "$(whoami)" -aG docker && newgrp docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PROJECT = myProject | |
FUNCTION = $(PROJECT) | |
REGION = us-west-1 | |
ENVCHAIN = my-aws-env | |
all: build | |
.PHONY: clean build deploy | |
clean: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Marlin 3D Printer Firmware | |
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin] | |
* | |
* Based on Sprinter and grbl. | |
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure you have Ubuntu 18.04 and Docker >= 1.12 installed | |
# nvidia drivers (Ubuntu-based distros) | |
sudo add-apt-repository ppa:graphics-drivers/ppa | |
sudo apt-get update | |
sudo apt-get install ubuntu-drivers-common | |
# show list of drivers to install | |
sudo ubuntu-drivers devices |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# stop execution if error | |
set -e | |
export DEBIAN_FRONTEND=noninteractive | |
# pre-requirements | |
apt-get update | |
apt-get upgrade -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker exec -ti gitlab bash | |
cd /home/git/gitlab | |
sudo -u git -H bundle exec rails console production | |
User.find_each(&:disable_two_factor!) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for D in `find . -type d` | |
do | |
pushd "$D" | |
for i in *.CR2; do sips -s format jpeg $i --out "${i%.*}.jpg"; done | |
popd | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import datetime | |
address = '8.8.8.8' | |
ping_timeout = 5 | |
attempts = 4 | |
log_file = '/var/log/ping_test.log' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ define "upstream" }} | |
{{ if .Address }} | |
{{/* If we got the containers from swarm and this container's port is published to host, use host IP:PORT */}} | |
{{ if and .Container.Node.ID .Address.HostPort }} | |
# {{ .Container.Node.Name }}/{{ .Container.Name }} | |
server {{ .Container.Node.Address.IP }}:{{ .Address.HostPort }}; | |
{{/* If there is no swarm node or the port is not published on host, use container's IP:PORT */}} | |
{{ else if .Address.IP }} | |
# {{ .Container.Name }} | |
server {{ .Address.IP }}:{{ .Address.Port }}; |
NewerOlder