Get it from the App Store.
In XCode's Preferences > Downloads you can install command line tools.
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf using homebrew.
| Get the Heroku db as detailed here: | |
| http://devcenter.heroku.com/articles/pgbackups#exporting_via_a_backup | |
| 1. heroku pgbackups:capture | |
| 2. heroku pgbackups:url <backup_num> #=>backup_url | |
| - get backup_num with cmd "heroku pgbackups" | |
| 3. curl -o latest.dump <backup_url> | |
| Then locally do: | |
| $ pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb latest.dump |
| # Simple, scrappy UDP DNS server in Ruby (with protocol annotations) | |
| # By Peter Cooper | |
| # | |
| # MIT license | |
| # | |
| # * Not advised to use in your production environment! ;-) | |
| # * Requires Ruby 1.9 | |
| # * Supports A and CNAME records | |
| # * See http://www.ietf.org/rfc/rfc1035.txt for protocol guidance | |
| # * All records get the same TTL |
| #!/bin/bash | |
| function usage { | |
| echo "Usage: distractions [on/off]" | |
| exit | |
| } | |
| if [ $# -eq 0 ]; then | |
| usage | |
| fi |
| # unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D | |
| rails_env = ENV['RAILS_ENV'] || 'production' | |
| # 16 workers and 1 master | |
| worker_processes (rails_env == 'production' ? 16 : 4) | |
| # Load rails+github.git into the master before forking workers | |
| # for super-fast worker spawn times | |
| preload_app true |