Skip to content

Instantly share code, notes, and snippets.

View whiteley's full-sized avatar

Matt Whiteley whiteley

View GitHub Profile
@potatosalad
potatosalad / project-web-reload.conf
Created February 11, 2012 03:32
Upstart + Bluepill + Unicorn with hot restart
# /etc/init/project-web-reload.conf
pre-start script
initctl restart project-web
sleep 15
end script
exec /usr/local/rvm/bin/default_bluepill restart
@bakins
bakins / gist:804922
Created January 31, 2011 22:02
brain dead data bags in chef solo
if Chef::Config[:solo]
class Chef
module Mixin
module Language
def data_bag(bag)
@solo_data_bags = {} if @solo_data_bags.nil?
unless @solo_data_bags[bag]
@solo_data_bags[bag] = {}
Dir.glob(File.join(Chef::Config[:data_bag_path], bag,
@dysinger
dysinger / *scratch*
Created April 14, 2010 05:16
Chef-repo & Opsode Cookbooks in the same git repo
#!/bin/sh
# Demo how your can merge opscode chef-repo & cookbooks
# and perm. keep up to date with opscode cookbooks (the last "git" cmd)
% git clone git://github.com/opscode/chef-repo.git
Initialized empty Git repository in /home/tim/src/chef-repo/.git/
remote: Counting objects: 107, done.
remote: Compressing objects: 100% (99/99), done.
remote: Total 107 (delta 45), reused 0 (delta 0)
Receiving objects: 100% (107/107), 16.14 KiB, done.
Resolving deltas: 100% (45/45), done.
@timcharper
timcharper / gist:198039
Created September 30, 2009 11:44
how to create an empty commit under an existing initial commit
$ rm -rf .git
$ git init
Initialized empty Git repository in /Users/timcharper/project/.git/
$ date > file.txt
$ git add file.txt
$ git commit -m "initial commit"
[master (root-commit) 399a71c] initial commit
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 file.txt
master$