Skip to content

Instantly share code, notes, and snippets.

View mhfs's full-sized avatar

Marcelo Silveira mhfs

View GitHub Profile
@mhfs
mhfs / ubuntu10.04-ruby192.erb
Created August 15, 2011 21:14 — forked from czottmann/ubuntu10.04-ruby192.erb
Ubuntu 10.04 + Ruby 1.9.2p180 chef bootstrap file
bash -c '
if [ ! -f /usr/local/bin/chef-client ]; then
apt-get update
apt-get -y upgrade
apt-get install -y build-essential wget zlib1g-dev libssl-dev libffi-dev
cd /usr/src
wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p180.tar.bz2
tar xjf ruby-1.9.2-p180.tar.bz2
cd ruby-1.9.2-p180
./configure
@nesquena
nesquena / caveatPatchor.js
Created May 17, 2011 00:37
propane_extensions
/*
As of version 1.1.2, Propane will load and execute the contents of
~/Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
@ozeias
ozeias / specs.watchr
Created February 4, 2011 18:40
specs.watchr
# Run me with:
#
# $ watchr specs.watchr
# --------------------------------------------------
# Convenience Methods
# --------------------------------------------------
def all_spec_files
Dir['spec/**/*_spec.rb']
end
@mhfs
mhfs / gist:468180
Created July 8, 2010 15:45
Textmate shortcuts
Ctrl-L gives a hashrocket with spaces
Shift-Ctrl-[ alternate between {} and do/end blocks
Shit-Cmd-D open the require file in another window
Ctrl-shift-V validates syntax of ruby file
Ctrl-shift-E executes the line
Ctrl-shift-; alternate between string and symbol
Shift-Option-Cmd-Down show possible destinations
Ctrl-Shift-H create partial from selection
Ctrl-P gives params[:id]
@jnunemaker
jnunemaker / gist:468109
Created July 8, 2010 14:52 — forked from jseifer/gist:468075
rvm version and git branch/dirtyness in prompt
function __git_dirty {
git diff --quiet HEAD &>/dev/null
[ $? == 1 ] && echo "!"
}
function __git_branch {
__git_ps1 "(%s)"
}
function __my_rvm_ruby_version {