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 | |
## | |
# Process management for Redis on OSX | |
# | |
# To install: | |
# | |
# git clone https://gist.github.com/5214562.git && \ | |
# mv 5214562/redis.sh /usr/local/bin/redis && \ | |
# chmod +x /usr/local/bin/redis |
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 | |
USERDATA=$(ec2metadata --user-data) | |
NICKNAME="hackernews" | |
if [ "$USERDATA" != "unavailable" ] ; then | |
NICKNAME=$USERDATA | |
fi | |
# Setup Supervisor | |
echo "[program:warrior] |
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 -o nounset | |
set -o errexit | |
# Install dependencies | |
apt-get update | |
apt-get install -y build-essential lua5.1 liblua5.1-0-dev python python-setuptools python-dev git-core openssl libssl-dev python-pip rsync gcc make git supervisor | |
pip install seesaw | |
git clone https://github.com/ArchiveTeam/yahoomessages-grab |
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
- git://github.com/ArchiveTeam/yahoomessages-grab.git |
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
gem list | cut -d" " -f1 | xargs gem uninstall -aIx |
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 | |
set -o nounset | |
set -o errexit | |
help() { | |
printf "envclean - managing ruby environments | |
envclean list list available ruby versions (uses rbenv). | |
envclean for RUBY_VERSION cleans and initializes a specific ruby version. |
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 | |
/usr/bin/env php -d allow_url_fopen=On -d detect_unicode=Off /data/homedirs/deploy/build/composer.phar $* |
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
apt-get install -y curl | |
# Install nginx | |
if [ "xx" = "x$(grep 'nginx' /etc/apt/sources.list )x" ] ; then | |
echo 'Installing nginx...' | |
echo ' | |
# Repositories for up to date nginx packages | |
deb http://nginx.org/packages/mainline/ubuntu/ precise nginx | |
deb-src http://nginx.org/packages/mainline/ubuntu/ precise nginx' >> /etc/apt/sources.list | |
curl -s http://nginx.org/keys/nginx_signing.key | apt-key add - | |
apt-get update > /dev/null |
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 | |
# Usage: replace "foo" "bar" "/etc/omg.conf" | |
replace() { | |
local pattern=$1 | |
local replacement=$2 | |
local file=$3 | |
local tempfile="$(mktemp -t temp.XXXXX)" | |
sed "s/$pattern/$replacement/" ${file} > ${tempfile} && mv ${tempfile} ${file} |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
if not RUBY_PLATFORM.downcase.include?("mswin") | |
config.vm.provider "virtualbox" do |v| | |
v.customize ["modifyvm", :id, "--cpus", | |
`awk "/^processor/ {++n} END {print n}" /proc/cpuinfo 2> /dev/null || sh -c 'sysctl hw.logicalcpu 2> /dev/null || echo ": 2"' | awk \'{print \$2}\' | cut -d' ' -f2 `.chomp ] | |
end | |
end |