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 | |
OPTS_SPEC="\ | |
$(basename $0 .sh) subcommand <options> | |
subcommands: | |
data - download a dataset | |
-- | |
h,help show help | |
d,debug debug output |
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 | |
## JDK=$(cd /usr/java/jdk1.8* && pwd) | |
JDK=/usr/java/latest | |
update-alternatives \ | |
--install /usr/bin/java java $JDK/jre/bin/java 18000 \ | |
--slave /usr/lib/jvm/jre jre $JDK/jre \ | |
--slave /usr/bin/javac javac $JDK/bin/javac \ | |
--slave /usr/bin/javah javah $JDK/bin/javah \ | |
--slave /usr/bin/javap javap $JDK/bin/javap \ | |
--slave /usr/bin/jar jar $JDK/bin/jar \ |
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 | |
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 | |
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 | |
# | |
# | |
# Download the latest docker release and | |
# make sure /etc/sysconfig/docker is set | |
# to use it. | |
# | |
set -e |
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 | |
# | |
# 1. Downloads, builds and install Golang from source. | |
# into $HOME/opt/goXXX where GOROOT is $HOME/opt/go | |
# symlink to the current version. | |
# 2. Install some standard go tools and helpers | |
# 3. Update $GOPATH built packages with new version of compiler | |
# | |
set -e |