Skip to content

Instantly share code, notes, and snippets.

View richo's full-sized avatar

richö butts richo

View GitHub Profile
@richo
richo / varnishtest.rb
Created May 17, 2012 00:18 — forked from lox/varnishtest.rb
Varnish::Test syntax
require 'test/unit'
require 'varnish/test'
require 'threading'
# initializer
#
q_in = Threading::Queue.new
q_out = Threading::Queue.new
thread = Thread.new do |q|
@richo
richo / gist:969695
Created May 12, 2011 23:47 — forked from defunkt/gist:206253
unicorn sample configuration
# unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D
# Set by set_env anyway
rails_env = ENV['RAILS_ENV'] || 'production'
# 4 workers in testing and 1 master
worker_processes (rails_env == 'production' ? 4 : 1)
# Load rails+github.git into the master before forking workers
# for super-fast worker spawn times
@richo
richo / .vimrc
Created May 6, 2011 04:08 — forked from ConradIrwin/.vimrc
# Comment vim text-object
function! SelectComment()
let curindent = indent(".")
let commstr = &commentstring[0]
" bail if not a comment
if getline(".")[curindent] != commstr
return
endif
" find the first commented line