Skip to content

Instantly share code, notes, and snippets.

@tigris
tigris / chef_solo_bootstrap.sh
Created April 30, 2012 02:16 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo + Git
#!/usr/bin/env bash
GITHUB_USER="tigris"
GITHUB_PROJECT=...
GIT_BRANCH="master"
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libyaml-dev libreadline-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
tar -xvzf ruby-1.9.3-p194.tar.gz
@tigris
tigris / attributes.rb
Created August 3, 2012 12:27 — forked from shapeshed/unicorn
Unicorn / Monit setup
default['unicorn']['before_fork'] = %Q(
defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect!
old_pid = '#{node['unicorn']['pid']}.oldbin'
if File.exists?(old_pid) && server.pid != old_pid
begin
Process.kill('QUIT', File.read(old_pid).to_i)
rescue Errno::ENOENT, Errno::ESRCH
puts 'Old master alerady dead'
end
source 'http://rubygems.org'
gem 'rails', '4.0.0.beta1'
gem 'sqlite3'