Tmux cheatsheet: https://gist.github.com/MohamedAlaa/2961058
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 | |
if [ "$1" != "" ] && [ "$1" = "-h" ]; then | |
echo "Shipyard Deploy uses the following environment variables:" | |
echo " ACTION: this is the action to use (deploy, upgrade, node, remove)" | |
echo " DISCOVERY: discovery system used by Swarm (only if using 'node' action)" | |
echo " IMAGE: this overrides the default Shipyard image" | |
echo " PREFIX: prefix for container names" | |
echo " SHIPYARD_ARGS: these are passed to the Shipyard controller container as controller args" | |
echo " TLS_CERT_PATH: path to certs to enable TLS for Shipyard" |
-- SCP (secure copy) cheatsheet --
copy from local machine to remote machine
scp localfile ser@host:/path/to/whereyouwant/thefile
copy from remote machine to local machine
scp user@host:/path/to/remotefile localfile
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
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
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
# https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf | |
set-option -g status-bg colour235 #base02 | |
set-option -g status-fg colour136 #yellow | |
set-option -g status-attr default | |
# set window split | |
bind-key v split-window -h | |
bind-key b split-window | |
# default window title colors |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 | |
# Usage | |
# $ sudo chmod +x add_sudoer.sh | |
# $ ./add_sudoer.sh username | |
# | |
# add a number of users saved in txt | |
# $ ./add_sudoer.sh `cat list_of_users.txt` | |
# | |
# --> list of users to add separated by space |
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 | |
sudo apt-get update | |
sudo apt-get -y install linux-image-extra-$(uname -r) | |
sudo sh -c "wget -qO- https://get.docker.io/gpg | apt-key add -" | |
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list" | |
sudo apt-get update | |
sudo apt-get -y install lxc-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
#!/bin/bash | |
# This is a bash script to set a static IP. | |
# Tested in Ubuntu 14.04, added more | |
readInfo() { | |
read -p "Type static IP (eg - 10.10.10.2) : " staticip | |
read -p "Type Default Gateway (eg - 10.10.10.1) : " gateway | |
read -p "Type Netmask (eg - 255.255.255.0) : " netmask | |
read -p "Type DNS (eg - 8.8.8.8) : " dns | |
} |
NewerOlder