Skip to content

Instantly share code, notes, and snippets.

View cwsaylor's full-sized avatar

Chris Saylor cwsaylor

View GitHub Profile
user deploy deploy;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@cwsaylor
cwsaylor / Snow Leopard Dev Setup
Created September 14, 2009 19:40
Snow Leopard Developer Setup
== Install the Developer Tools from the Snow Leopard DVD
I mostly follow HiveLogic except for paths. I use the Mac OS X way of setting paths. I also compile everything into it's own folder for easy upgrading.
mate /etc/paths
[ Add the following to the TOP ]
---------------------------------------
~/bin
/usr/local/bin
/usr/local/ruby/bin
# Based on Evan Weaver's config and altered slightly to work on Ubuntu 9.04
# as a drop in to /etc/mysql/conf.d/custom.cnf
#
# my.cnf.innodb_512
#
# This is a MySQL 5.x configuration file designed for the typical
# webapp, running on a 512MB server that is also the app and
# httpd server. The below configuration dedicates a bit more
# than half of the system resources to MySQL. It is InnoDB-
# specific, and will not perform well with many MyISAM tables.
# Anything between dashes gets copied into the file preceding it.
# Brackets hold notes and instructions
hostname foo.com
vi /etc/hostname
---------------------------------
foo.com
---------------------------------
mkdir .ssh
#!/usr/bin/env ruby
require 'rubygems'
require 'tinder'
# Here is a cron entry to have your standup every day at 10:30
# 30 10 * * 1,2,3,4,5 /usr/bin/ruby /home/deploy/bin/standup.rb
# Change these options
config = {
@cwsaylor
cwsaylor / gist:90971
Created April 6, 2009 22:07
Capistrano deployment campfire notifier
# Requires config file config/campfire.yml with the following settings:
# account: "foo"
# email: "[email protected]"
# password: "changeme"
# ssl: false
# room: "foobar"
require 'tinder'
@cwsaylor
cwsaylor / gist:74918
Created March 6, 2009 14:18
Compile Readline on Mac OS X
# Compile readline on Mac OS X
cd /usr/local/src
curl -O ftp://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz
tar xzvf readline-5.2.tar.gz
cd readline-5.2
curl -O http://ftp.gnu.org/gnu/readline/readline-5.2-patches/readline52-012
patch -p0 < readline52-012
./configure --prefix=/usr/local
make
@cwsaylor
cwsaylor / gist:74430
Created March 5, 2009 16:46
Install ImageMagick for only manipulating image files
# Get http://www.ijg.org/files/jpegsrc.v6b.tar.gz
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
cp /usr/share/libtool/config.sub .
cp /usr/share/libtool/config.guess .
sudo mkdir -p /usr/local/man/man1
./configure --enable-shared --enable-static
make
sudo make install
# Customize the terminal tabs
# put this in your .profile or .bashrc
function settitle() { echo -ne "\e]2;$@\a\e]1;$@\a"; }
function cd() { command cd "$@"; settitle `basename $(pwd)`; }