Archive for category ruby on rails
Cheat Sheets
Publicado por Rodrigo Ramalho da Silva em Cheat Sheet, ruby on rails em 08/07/2011
Para evitar o problema de ter que ficar dando uma googlada pra lembrar 'aquele' comando que está lhe falhando a memória, basta aprender a explorar os "cheat sheets". Cheat sheet é um resumo dos principais comandos de uma determinada API. Hoje precisei lembrar alguns comandos do heroku e achei esse cheat sheet no qual acrescentei algumas linhas. Heroku Cheat Sheet === General Commands help # show this usage version # show the gem version list # list your apps create [<name>] # create a new app keys # show your user's public keys keys:add [<path to keyfile>] # add a public key keys:remove <keyname> # remove a key by name (user@host) keys:clear # remove all keys ps # display process === App Commands (execute inside a checkout directory, or use --app <appname>) info # show app info, like web url and git repo open # open the app in a web browser rename <newname> # rename the app dynos <qty> # set the app to use the specified qty of dynos sharing:add <email> # add a collaborator sharing:remove <email> # remove a collaborator sharing:transfer <email> # transfers the app ownership domains:add <domain> # add a custom domain name domains:remove <domain> # remove a custom domain name domains:clear # remove all custom domains ssl:add <pem> <key> # add SSL cert to the app ssl:remove <domain> # removes SSL cert from the app domain rake <command> # remotely execute a rake command console <command> # remotely execute a single console command console # start an interactive console to the remote app restart # restart app servers logs # fetch recent log output for debugging logs:cron # fetch cron log output maintenance:on # put the app into maintenance mode maintenance:off # take the app out of maintenance mode config # display the app's config vars (environment) config:add key=val [...] # add one or more config vars config:remove key [...] # remove one or more config vars config:clear # clear user-set vars and reset to default db:pull [<database_url>] # pull the app's database into a local database db:push [<database_url>] # push a local database into the app's remote database db:reset # reset the database for the app -- Postgres databases --- pg:info # show db info pgbackups # list postgres backups pgbackups:url id # get url to download backup pgbackups:capture # capture a new backup pgbackups:destroy id # destroy bakup bundles # list bundles for the app bundles:capture [<bundle>] # capture a bundle of the app's code and data bundles:download # download most recent app bundle as a tarball bundles:download <bundle> # download the named bundle bundles:animate <bundle> # animate a bundle into a new app bundles:destroy <bundle> # destroy the named bundle addons # list addons addons:add name [key=value] # install addon (with zero or more config vars) addons:remove name # uninstall an addons addons:clear # uninstall all addons destroy # destroy the app permanently === Example: rails myapp cd myapp git init git add . git commit -m "my new app" heroku create git push heroku master