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
set(:branch) do | |
if :production == stage | |
branch = Capistrano::CLI.ui.ask("#{`git branch`}\n\nWhich branch do you want to deploy?: ") | |
raise "Error: The master branch cannot be deployed to production." if 'master' == branch | |
else | |
`git branch | grep ^* | sed s/\\*\\ //`.chomp # use current active branche | |
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
# port of http://www.perlmonks.org/?node_id=162190 | |
# | |
# Please refactor this if necessary | |
# leonb -at- beriedata -dot- nl | |
# | |
class String | |
def yoda | |
word = %w{is be will show do try are teach have}.select { |word| self =~ /\b#{word}\b/ }[0] | |
if word | |
x = (self =~ /\b#{word}\b/) + word.size |
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
#!/usr/bin/env ruby | |
# | |
# Send a growl message with latest updates in your feed | |
# | |
# edit your crontab (crontab -e) and add this line | |
# (this checks your feed every 30 minutes) | |
# */30 * * * * ~/bin/WakoopaGrowl.rb > /dev/null | |
# | |
# create a yaml file (mate ~/.wakoopa_growl) within your homedirectory | |
# username: your_username |
NewerOlder