This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I use Cucumber 0.3.97. Your mileage may vary with older versions. | |
# install rspactor | |
sudo gem install guillaumegentil-rspactor | |
# Change your database.yml to include the following | |
test: &TEST | |
database: your_database_name_here | |
<<: *login |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# notify me by echo, text-to-speech, AND growl. | |
function shout { | |
echo $1 && say $1 && growlnotify -m $1; | |
} | |
# usage | |
shout "I'm using this in my bash scripts so that my scripts talk to me and get my attention." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!.*/(\.[^/]*|vendor/rails|coverage|sphinx|script|tmp|data|log|doc|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle))$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ~projectname git:(master) git br -l|grep '^ LH'|awk '{print $1}' | |
LH_1429 | |
LH_1631 | |
LH_1646 | |
LH_1660 | |
LH_1667 | |
LH_1669 | |
LH_1712 | |
LH_1721 | |
LH_1737 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the lack of indenting came directly from the app i am reviewing code for | |
m=[[1,1,1,1,1]] | |
i=j=0 | |
while i < 30 do | |
m[i]=[i,i,i,i,i] | |
i+=1 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="hidden" id="x_something" value="1" /> | |
<%= periodically_call_remote :update => 'some shit', | |
:url => {:action => :action_name}, | |
:condition => "$('x_something') == '1'", | |
:frequency => 2.0 %> | |
# then... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# aiming to have something like: | |
# link_to(article.title, article_path(article)) | |
# and build out /articles/2009/03/10/foo-bar-baz | |
# | |
map.article 'articles/:year/:month/:day/:permalink', :controller => 'articles', :action => 'show', | |
:year => /\d{4}/, :day => /\d{1,2}/, :month => /\d{1,2}/ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Array | |
def move_to_front_of_line(x) | |
return [ self[x] ] | self | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Will append the current Lighthouse ticket number to the commit message automatically | |
# when you use the LH_* branch naming convention. | |
# | |
# Drop into .git/hooks/commit-msg | |
# chmod +x .git/hooks/commit-msg | |
exec < /dev/tty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Will append the current Lighthouse ticket number to the commit message automatically | |
# when you use the LH_* branch naming convention. | |
# | |
# Drop into .git/hooks/commit-msg | |
# chmod +x .git/hooks/commit-msg | |
commit_message=$1 |