Instantly share code, notes, and snippets.

@urfolomeus /alias.sh
Last active Aug 29, 2015

Embed
What would you like to do?
##heroku
alias hp="heroku_helper production"
alias hs="heroku_helper staging"
alias hpc="heroku_helper production run console"
alias hpl="heroku_helper production logs"
alias hprdbm="heroku_helper production run rake db:migrate"
alias hsc="heroku_helper staging run console"
alias hsl="heroku_helper staging logs"
alias hsrdbm="heroku_helper staging run rake db:migrate"
#!/usr/bin/env ruby
class String
def urlize
self.gsub(/[^a-zA-Z-]/, '-')
end
end
env, command_name, *args = ARGV
env = nil if env == 'production'
app = Dir.pwd.split('/').last.urlize
app << "-#{env}" if env
command = "heroku #{command_name} #{args.join(' ')} --app #{app}"
puts command
exec command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment