Skip to content

Instantly share code, notes, and snippets.

View stuartsaunders's full-sized avatar
👋

Stuart Saunders stuartsaunders

👋
View GitHub Profile
@stuartsaunders
stuartsaunders / drb_command_line.rb
Created December 20, 2010 06:32
OS X 10.6.5 + Spork 0.8.4 + RSpec 1.3.1 = DRb.start_service('druby://localhost:0') SocketError
require "drb/drb"
module Spec
module Runner
# Facade to run specs by connecting to a DRB server
class DrbCommandLine
def self.port(options)
(options.drb_port || ENV["RSPEC_DRB"] || 8989).to_i
end
@stuartsaunders
stuartsaunders / NBench
Created September 7, 2010 01:22
Droid2 Benchmark
BYTEmark* Native Mode Benchmark ver. 2 (10/95)
Index-split by Andrew D. Balsa (11/97)
Linux/Unix* port by Uwe F. Mayer (12/96,11/97)
TEST : Iterations/sec. : Old Index : New Index
: : Pentium 90* : AMD K6/233*
--------------------:------------------:-------------:------------
NUMERIC SORT : 220.22 : 5.65 : 1.85
STRING SORT : 9.968 : 4.45 : 0.69
BITFIELD : 8.0907e+07 : 13.88 : 2.90
@stuartsaunders
stuartsaunders / gist:457645
Created June 29, 2010 19:15 — forked from reinh/ssp.sh
Hack && Ship
alias ssp="hack && rake spec && ship"
" Open NERDTree when vim starts
autocmd VimEnter * NERDTree
autocmd VimEnter * wincmd p
" Map leader key to comma
let mapleader = ","
" NERDTreeFind key binding
noremap <silent> <Leader>f :NERDTreeFind<CR>
# Add expires header for static content
location ~* \.(js|css|jpg|jpeg|gif|png)$ {
if (-f $request_filename) {
expires max;
break;
}
}