All these useful tips (and more!) taken from http://ruby.railstutorial.org/chapters/
This is based on Rails 3.2, but should work on Rails 4.0.
(skip standard test unit and instead will use RSpec)
$ cd ~/rails_projects
| # fetch @patio11's tweets from microconf (roughly apr 3 on) | |
| # signature generated from https://dev.twitter.com/rest/reference/get/statuses/user_timeline | |
| curl --get 'https://api.twitter.com/1.1/statuses/user_timeline.json' --data 'count=200&screen_name=patio11&since_id=717036680947965953' --header 'Authorization: OAuth oauth_consumer_key="x6nmC5cEByCeyudJjVKsMA", oauth_nonce="56b83cf5f068e31996fc484364e99423", oauth_signature="0vY6VEDKTI2Bb8J09osG0yqTA6M%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1460264255", oauth_token="49019793-1cje0xH21w4OsEudjSXTIj1hDQhorGifIrfuBQ0Eb", oauth_version="1.0"' --verbose > tweets.json | |
| # import into postgres | |
| psql -d test -c "CREATE TABLE pgtweets (data json)" | |
| psql -d test -c "COPY pgtweets FROM '$(pwd)/tweets.json'" | |
| # total activity over these 200 tweets |
| rsync -e 'ssh -p 12345 -i ~/.ssh/id_custom_rsa' --stats --progress -vaz ~/local-folder julien@host.com:~/remote-folder |
| #! /bin/bash | |
| MAILTO=$(whoami) | |
| SHELL=/bin/bash | |
| PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
| # directory to save backups in, must be rwx by dokku user | |
| BASE_DIR="/var/lib/dokku/data/storage/backups/postgres" | |
| YMD=$(date "+%Y-%m-%d") | |
| DIR="$BASE_DIR/$YMD" |
All these useful tips (and more!) taken from http://ruby.railstutorial.org/chapters/
This is based on Rails 3.2, but should work on Rails 4.0.
(skip standard test unit and instead will use RSpec)
$ cd ~/rails_projects
These commands are good as of 2011-07-27.
2014-06-05: update for OSX Yosemite: https://gist.github.com/chrisb/4d6a09c6cc1ca2e1b14e 2013-10-24: update for OSX Mavericks: http://dean.io/setting-up-a-ruby-on-rails-development-environment-on-mavericks/
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12)
| ### Move a directory out of an existing repo, and push it to its own repo, keeping only relevant commits: | |
| See http://teach.github.com/articles/lesson-filter-branch/ |