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
# Enable Webrat's Selenium mode if one or more scenarios is tagged @selenium | |
Webrat.configure do |config| | |
config.mode = :rails | |
ObjectSpace.each_object(Cucumber::Ast::Features) do |features| | |
config.mode = :selenium if features.tag_count('selenium').nonzero? | |
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
git_prompt_info() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) | |
if [[ -n $ref ]]; then | |
echo "[%{$fg_bold[green]%}${ref#refs/heads/}%{$reset_color%}]" | |
fi | |
} | |
# makes color constants available | |
autoload -U colors | |
colors |
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
# Variation on Hashrocket's script for managing the git process | |
# as documented here: http://reinh.com/blog/2008/08/27/hack-and-and-ship.html | |
# Create shell scripts out of each of these, put them in your path (~/bin for example) | |
# chmod 755 them and use like this: | |
# | |
# This version of hack is totally different than Hackrockets. I feel that hack implies | |
# that you are getting started, not finishing up. sink is Hashrockets hack. | |
# | |
# $ hack branch_name | |
# Test and Implement until done |
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
# usage: rails new APP_NAME -m http://gist.github.com/627198.txt -TJ | |
# the -T drops test-unit and the -J drops prototype | |
gem "pg" | |
gem "omniauth" | |
gem "paperclip" | |
gem "haml" | |
gem "sass" |
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
# virtualenv aliases | |
# http://blog.doughellmann.com/2010/01/virtualenvwrapper-tips-and-tricks.html | |
alias v='workon' | |
alias v.deactivate='deactivate' | |
alias v.mk='mkvirtualenv --no-site-packages' | |
alias v.mk_withsitepackages='mkvirtualenv' | |
alias v.rm='rmvirtualenv' | |
alias v.switch='workon' | |
alias v.add2virtualenv='add2virtualenv' | |
alias v.cdsitepackages='cdsitepackages' |
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
ssh_user = "[email protected]" # for rsync deployment | |
remote_root = "~/path/to/remote/" # for rsync deployment | |
namespace :styles do | |
desc "Clear styles" | |
task :clear do | |
puts "*** Clearing styles ***" | |
system "rm -Rfv css/*" | |
end | |
desc "Generate styles" |
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
ssh_user = "USERNAME" | |
remote_path = "PATH TO THEME" | |
namespace :styles do | |
desc "Clear styles" | |
task :clear do | |
puts "*** Clearing styles ***" | |
system "rm -Rfv styles.css" | |
end | |
desc "Generate styles" |
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
function increment(start, timesToIncrement) { | |
var counter = 0; | |
while( counter !== timesToIncrement) { | |
start++ | |
} | |
return start; | |
} |
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
function say(word) { | |
console.log(word); | |
} | |
function execute(someFunction, value) { | |
someFunction(value); | |
} | |
execute(say, "Hello"); |
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
function execute (someFunction, value) { | |
someFunction(value); | |
} | |
execute(function(word) { consnole.log (word) }, "hello"); |
OlderNewer