Skip to content

Instantly share code, notes, and snippets.

@mtkd
mtkd / Monkeypatch to add 3 decimal places to 'Code to Test Ratio' in rake stats
Created November 6, 2009 19:51
Monkeypatch to add 3 decimal places to 'Code to Test Ratio' in rake stats
# Monkey patch to add 3 decimal places to code/test ratio
# Add to rakefile
Rake::TaskManager.class_eval do
def remove_task(task_name)
@tasks.delete(task_name.to_s)
end
end
def remove_task(task_name)
Rake.application.remove_task(task_name)
@mtkd
mtkd / Latest .bash_profile
Created September 6, 2009 16:36
.bash_profile
# command prompt
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;36m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
@mtkd
mtkd / Checkout alternative branch on Github
Created June 12, 2009 20:05
Checkout alternative branch on Github
git fetch origin other_branch:other_branch
* [new branch] other_branch -> other_branch
git branch
* master
other_branch
git checkout other_branch
@mtkd
mtkd / gist:108268
Created May 7, 2009 18:39
Listing Ruby Methods
puts I18n.public_methods.grep(/method/)
puts "\n\I18n.methods : "+ I18n.methods.sort.join("\n").to_s+"\n\n"
@mtkd
mtkd / sor09 schedule
Created March 23, 2009 16:35
SRC 2009 Programme
Friday
09.00 Keynote - Marcel Molina
10.00 Getting Git - Scott Chacon
10.45 Break
11.00 Building Blocks of Modularity - Jim Weirich
11.45 Break
12.00 Merb - Yehuda Katz
13.00 Lunch
14.30 Cannelloni Beats Spaghetti - Bruce Scharlau