Skip to content

Instantly share code, notes, and snippets.

[
{ "keys": ["super+b"], "command": "run_single_ruby_test",
"context": [ { "key": "selector", "operator": "equal",
"operand": "source.ruby, source.rspec, text.gherkin.feature"
} ]
},
{ "keys": ["super+shift+b"], "command": "run_all_ruby_test",
"context": [ { "key": "selector", "operator": "equal",
"operand": "source.ruby, source.rspec, text.gherkin.feature"
} ]
@daymun
daymun / gist:5248360
Created March 26, 2013 19:24
ruby syntax tricks
[:year, :month, :day].each { |m| delegate m, to: :child_model }
def_each :failure, :error do |method_name|
self.state = method_name
end
@daymun
daymun / all_the_toys.rb
Created October 9, 2012 01:09 — forked from quinn/all_the_toys.rb
all the fun stuff i use in my default stack!
# data
gem 'carrierwave'
gem 'fog'
gem 'mini_magick'
gem 'resque'
gem 'mysql', group: :development
gem 'pg', group: :production
# controllers and views
gem 'haml-rails'
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
export EDITOR="subl -w"
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
export PS1='\[\033[0;35m\]$(rbenv version-name)\[\033[0;32m\] \w\[\033[00m\] \[\033[00m\]at\[\033[0;32m\]$(__git_ps1)\[\033[00m\] $ '
fi
# History Handling
@daymun
daymun / post-receive.sh
Created June 3, 2012 00:50
post-receive hook for devinwadsworth.com
#!/bin/sh
echo 'Refreshing local files'
cd /var/www/devinwadsworth.com
git --git-dir='/var/www/devinwadsworth.com/.git' pull