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
# | |
# After running the above script, paste the following into your ~/.bash_profile or ~/.profile | |
# | |
if test -f "$HOME/.ssh/environment.$HOSTNAME"; then | |
source "$HOME/.ssh/environment.$HOSTNAME" | |
if ! test -e /proc/$SSH_AGENT_PID; then | |
rm -f $HOME/.ssh/environment.$HOSTNAME | |
unset SSH_AUTH_SOCK SSH_AGENT_PID | |
echo >&2 "Run ~/bin/ssh-agent.sh to set your SSH env" | |
echo >&2 "then source your profile to set the ssh-agent" |
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 | |
/usr/bin/logger -it drop_caches -p cron.info drop caches ${1:-3} | |
/bin/echo ${1:-3} > /proc/sys/vm/drop_caches |
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 | |
# | |
# Assume the given role, and print out a set of environment variables | |
# for use with aws cli. | |
# | |
# To use: | |
# | |
# $ eval $(./iam-assume-role.sh) | |
# |
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 | |
set -ex | |
V=3.6.2 | |
TMP=/tmp/gems/$LOGNAME/$$ | |
mkdir -p "$TMP/root/opt/puppet-$V" | |
trap "cd -; mv $TMP/*.rpm . ; rm -rf $TMP" EXIT | |
cd "$TMP" |
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 | |
ITER=5 | |
TMUXV=1.9a | |
EVENTV=2.0.21 | |
NCURSESV=5.9 | |
set -ex | |
export TMP=/tmp/tmux | |
rm -rf $TMP |
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 | |
# shellcheck disable=SC1073,SC1007,SC1072,SC1090,SC1091,SC2015 | |
if [[ $UID -ne 0 ]]; then | |
if ! type -t __git_ps1 >/dev/null 2>&1 && test -e /usr/share/git-core/contrib/completion/git-prompt.sh; then | |
. /usr/share/git-core/contrib/completion/git-prompt.sh | |
fi | |
if type -t __git_ps1 >/dev/null 2>&1; then | |
PS1='[\[\033[32m\]\u@\h\[\033[00m\] \[\033[36m\]\W\[\033[31m\]$(__git_ps1)\[\033[00m\]] \$ ' |
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-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" | |
sudo apt-get update | |
sudo apt-get install lxc-docker | |
echo 'docker,mesos' | sudo tee /etc/mesos-slave/containerizers | |
echo '5mins' | sudo tee /etc/mesos-slave/executor_registration_timeout | |
sudo service mesos-slave restart |
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 | |
V="${1:-1.3.0}" | |
curl -sSL -O https://get.docker.com/builds/Linux/x86_64/docker-${V} && chmod +x docker-${V} && sudo mv docker-${V} /usr/local/bin/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 | |
# | |
# The package name and version are parsed from the filename (in this case | |
# PACKAGE=virtualenv V=1.11.6). The package is downloaded to /var/tmp if it | |
# isn't already there, and the main script is executed. This is sort of like | |
# having a lightweight shim to the real remote executable package. Very cool, | |
# I can't believe I didn't think of this sooner. | |
# | |
# This same file will work for (almost) any package. | |
# |
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 | |
# | |
# | |
# Download the latest docker release and | |
# make sure /etc/sysconfig/docker is set | |
# to use it. | |
# | |
set -e |