Skip to content

Instantly share code, notes, and snippets.

View stuartsaunders's full-sized avatar
👋

Stuart Saunders stuartsaunders

👋
View GitHub Profile
# Add expires header for static content
location ~* \.(js|css|jpg|jpeg|gif|png)$ {
if (-f $request_filename) {
expires max;
break;
}
}
" 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>
@stuartsaunders
stuartsaunders / workflow.md
Created June 22, 2010 05:07 — forked from zaach/workflow.md
Versioning and Git Workflow

Semantic Versioning

Details:

Versions are denoted using a standard triplet of integers: MAJOR.MINOR.PATCH. The basic intent is that MAJOR versions are incompatible, large-scale upgrades of the API. MINOR versions retain source and binary compatibility with older minor versions, and changes in the PATCH level are perfectly compatible, forwards and backwards.

@stuartsaunders
stuartsaunders / gist:457645
Created June 29, 2010 19:15 — forked from reinh/ssp.sh
Hack && Ship
alias ssp="hack && rake spec && ship"
@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 / 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 / vim-ruby-debugger
Created December 26, 2010 15:02
Macports vim and vim-ruby-debugger
# https://github.com/astashov/vim-ruby-debugger
# x11 variant will install clientserver variant
sudo port upgrade vim +ruby +x11
@stuartsaunders
stuartsaunders / gist:755501
Created December 26, 2010 16:50
Uninstall inactive Macports
sudo port uninstall inactive
@stuartsaunders
stuartsaunders / .irbrc
Created December 28, 2010 02:29
awesome_print 0.3.x workaround for ActiveRecord objects in Rails 2.3.x
# https://github.com/michaeldv/awesome_print/issues/issue/22
require 'rubygems'
require 'irb/completion'
require 'yaml'
module ActiveRecord; end
...
@stuartsaunders
stuartsaunders / .gitignore
Created December 30, 2010 15:18
Global Git ignore file
git config --global core.excludesfile ~/.gitignore