(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb |
| module GeneralHelper | |
| def permitted_params | |
| @permitted_params ||= declared(params, include_missing: false) | |
| end | |
| end |
| #! /bin/bash | |
| # directory to save backups in, must be rwx by postgres user | |
| BASE_DIR="/var/backups/postgres" | |
| YMD=$(date "+%Y-%m-%d") | |
| DIR="$BASE_DIR/$YMD" | |
| mkdir -p $DIR | |
| cd $DIR | |
| # make database backup |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Command Line
pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb - load your rails into a pry sessionDebugger
| /* global google */ | |
| var GoogleMapComponent = Ember.Component.extend({ | |
| places: [], | |
| width: 500, | |
| height: 500, | |
| attributeBindings: ['style'], | |
| style: function () { | |
| return 'width:'+this.width+'px; height:'+this.height+'px'; |
This Gist: http://is.gd/dokkudjango
DigitalOcean: https://www.digitalocean.com/
Dokku: https://github.com/progrium/dokku
Dokku-Postgres: https://github.com/Kloadut/dokku-pg-plugin
| #!/bin/bash | |
| BACKUP="/tmp/s3/db" | |
| DATE=`date +"%Y-%m-%d"` | |
| DIR="${BACKUP}/${DATE}/" | |
| if [ ! -d $DIR ]; | |
| then | |
| mkdir -p $DIR | |
| fi |