Skip to content

Instantly share code, notes, and snippets.

@bartimaeus
bartimaeus / aws-manage
Created July 30, 2011 19:33
Script for Managing multiple AWS Accounts
#!/bin/sh
if [[ "cd ~/.aws | git branch | grep $1" = *$1 ]]; then
cd ~/.aws && git checkout $1 | cd -
echo "Ready to Manage $1!"
else
echo "$1 is not a valid ec2 branch"
fi
source ~/.bash_profile
@bartimaeus
bartimaeus / .gitconfig
Created September 28, 2011 21:25
Gitconfig defaults. Developed with Mike Smullin (github.com/mikesmullin)
[core]
editor = vim
excludesfile = ~/.gitignore_global
[user]
name = Eric Shelley
email = [email protected]
[color]
branch = auto
diff = auto
interactive = auto
@bartimaeus
bartimaeus / 0-readme.md
Created February 29, 2012 19:31 — forked from burke/0-readme.md
ruby-1.9.3-p125 cumulative performance patch.

Patched ruby 1.9.3-p0 for 30% faster rails boot

What is?

This script installs a patched version of ruby 1.9.3-p0 with patches to make ruby-debug work again (#47) and boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84).

Huge thanks to funny-falcon for the performance patches.

@bartimaeus
bartimaeus / install-ruby.sh
Created May 31, 2012 19:55 — forked from ryanb/chef_solo_bootstrap.sh
Install Ruby 1.9.3-p286 on Ubuntu 12.04 LTS
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libxml2-dev libxslt-dev libreadline6-dev libyaml-dev
# apt-get -y install libmysqlclient-dev # uncomment for mysql support
cd /tmp
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p286.tar.gz
tar -xvzf ruby-1.9.3-p286.tar.gz
cd ruby-1.9.3-p286/
./configure --prefix=/usr/local
make
@bartimaeus
bartimaeus / setup-rvm.sh
Created June 29, 2012 20:53
Setup RVM on Ubuntu Server
#!/bin/bash
sudo su -i # switch to the root user (or run every command with sudo)
apt-get -y update
apt-get -y install curl git-core
# Ruby dependencies
apt-get -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion libyaml-0-2 libyaml-dev
# apt-get -y install libmysqlclient-dev # for mysql support
@bartimaeus
bartimaeus / visudo
Created June 30, 2012 03:55
Allow rvm user to restart the application via capistrano
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
@bartimaeus
bartimaeus / [app_name].sh
Created June 30, 2012 03:58
Init script for rails application, originally developed by mikesmullin
#!/bin/bash
### BEGIN INIT INFO
# Provides: APPLICATION
# Required-Start: $all
# Required-Stop: $network $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start the APPLICATION unicorns at boot
# Description: Enable APPLICATION at boot time.
### END INIT INFO
@bartimaeus
bartimaeus / [app_name]
Created June 30, 2012 04:08
Nginx config for rails application
#
# These are some basic settings for nginx.
# If it's not installed, install via `apt-get install nginx`
# Many pieces of this config came from other people's settings. Sorry for the lack of attribution.
#
upstream [app_name]_unicorn {
server unix:/tmp/[app_name].sock;
}
@bartimaeus
bartimaeus / unicorn.rb
Created June 30, 2012 04:27
Sample unicorn.rb config for Rails
# Sample verbose configuration file for Unicorn (not Rack)
#
# This configuration file documents many features of Unicorn
# that may not be needed for some applications. See
# http://unicorn.bogomips.org/examples/unicorn.conf.minimal.rb
# for a much simpler configuration file.
#
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete
# documentation.
@bartimaeus
bartimaeus / mountain-lion-brew-setup.markdown
Created September 11, 2012 19:56 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.