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
server { | |
listen 80; | |
server_name HOSTNAME; | |
root /opt/PATH/; | |
index index.html; | |
rewrite ^/$ /en/PATH/ redirect; |
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 bash | |
if [ $EUID != 0 ]; then | |
"This script must be run with sudo" | |
exit $? | |
fi | |
echo " Installing dependencies" | |
apt-get install ia32-libs -y # Note: This dep is a bit overkill but it's useful anyway | |
ln -s /usr/lib/i386-linux-gnu/libgnome-keyring.so.0 /usr/lib/libgnome-keyring.so.0 |
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
jslint `find . | grep "\.json$"` |
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 -x | |
if [ $# == 2 ]; then | |
echo ">>> Cleaning up existing chef environment" | |
knife node delete -y $2 | |
knife client delete -y $2 | |
ssh -l root $2 'yum remove -y chef' | |
ssh -l root $2 'rm -rf /etc/chef' | |
ssh -l root $2 'rm -rf /opt/chef' | |
echo ">>> Bootstrapping $1 $2" |
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 ]; then | |
echo "adding ssh key to root on $1" | |
ssh $1 'sudo mkdir /root/.ssh/ || sudo chmod 700 /root/.ssh/' | |
cat ~/.ssh/id_rsa.pub | ssh $1 'sudo tee -a /root/.ssh/authorized_keys' | |
exit 0 | |
else | |
echo "wrong number of parameters" | |
exit 1 | |
fi |
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
ZSH=$HOME/.oh-my-zsh | |
ZSH_THEME="robbyrussell" | |
plugins=(git) | |
source $ZSH/oh-my-zsh.sh | |
export EDITOR=vim | |
# Java | |
export JAVA_HOME=`/usr/libexec/java_home -v 1.6` |
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
def call(command): | |
return subprocess.check_output(command.split(' ')) |
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
watch -d "find /opt/artifacts -mindepth 1 -maxdepth 1 -type d | wc -l | tr -d '\n' ; echo -n ' / ' ; find /opt/artifacts -mindepth 1 -maxdepth 1 -type f | wc -l" |
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
class MongoModel(object): | |
def __init__(**kwargs): | |
for key, value in kwargs.iteritems(): | |
# self.__dict__[key] = value | |
setattr(self, key, value) | |
class MongoList(object): | |
def __init__(): | |
if not self._type: | |
self._type = self.__name__[:-1] |
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
Show hidden characters
{ | |
"env": {"GOPATH":"$HOME/go"}, | |
"cmd": ["go", "build", "$file"] | |
} |