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
# quick and dirty postgres database restoration from heroku | |
# This works in my local dev environment | |
# It might not work in yours without some changes | |
# Now just uses Heroku::Auth to get an authenticated client. No | |
# need to read a credentials file. You probably need a recent | |
# version of the heroku gem for this to work | |
desc "Restore from heroku" | |
task :restore do | |
require 'pgbackups/client' |
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 | |
## you will probably need to run this via sudo | |
## sudo ruby focus.rb [on|off] | |
# inspired by http://al3x.net/2009/09/14/my-get-back-to-work-hack.html | |
require 'fileutils' | |
require 'tempfile' |
NewerOlder