start new:
tmux
start new with session name:
tmux new -s myname
| <?php | |
| /** | |
| * ArrayAsAcsiiTable.php | |
| * 31-Jul-2013 | |
| * | |
| * Ordinarily, I would suggest use of PEAR's Console_Table package, this | |
| * is just an example solution for the first test suggested at | |
| * http://phpixie.com/blog/test-tasks-for-php-interviews-that-developers-will-enjoy-solving/ | |
| * | |
| * PHP Version 5 |
| #Deploy and rollback on Heroku in staging and production | |
| %w[staging production].each do |app| | |
| desc "Deploy to #{app}" | |
| task "deploy:#{app}" => %W[deploy:set_#{app}_app deploy:push deploy:restart deploy:tag] | |
| desc "Deploy #{app} with migrations" | |
| task "deploy:#{app}:migrations" => %W[deploy:set_#{app}_app deploy:push deploy:off deploy:migrate deploy:restart deploy:on deploy:tag] | |
| desc "Rollback staging" |
| HSTORE PROBLEMS: | |
| If the specs are not running because you are running into hstore issues: | |
| 1. In the postgresql console: | |
| update pg_database set datallowconn = TRUE where datname = 'template0'; | |
| This allows you to edit your postgresql default database template. | |
| 2. In your shell: |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| #Deploy and rollback on Heroku in staging and production | |
| task :deploy_staging => ['deploy:set_staging_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
| task :deploy_production => ['deploy:set_production_app', 'deploy:push', 'deploy:restart', 'deploy:tag'] | |
| namespace :deploy do | |
| PRODUCTION_APP = 'YOUR_PRODUCTION_APP_NAME_ON_HEROKU' | |
| STAGING_APP = 'YOUR_STAGING_APP_NAME_ON_HEROKU' | |
| task :staging_migrations => [:set_staging_app, :push, :off, :migrate, :restart, :on, :tag] | |
| task :staging_rollback => [:set_staging_app, :off, :push_previous, :restart, :on] |