Today I Learned

TIL, 2017-08-18

  • Vim, visual block applies the next command to the block, and visual line doesn’t.
  • You can put require inside a method.
  • No need to
  • Whenever: wheneverize, crontab -l.
  • Rails task: rails g task namespace my_task1 my_task2 Reference
  • Whenever: They start off with almost no environment variables.
  • To remediate:
set :job_template, nil
set :output, 'cron.log' -> Just so you can see error messages
set :environment, 'development' -> By default this will be set as production
job_type :rake,"cd :path && :environment_variable=:environment bundle exec rake :task --silent :output" ->
env :PATH, ENV['PATH'] -> Add the normal ENV vars so you have Bundler accessible.
  • pg_dump and growl to back up own database every 3 hours.

This project is maintained by daryllxd