#Recipe to Clean Up Ugly Ruby
ack -l "######" | xargs ruby -i.bak -ne 'print if not /######/'
# check with git diff
find . | grep '\.bak$' | xargs rm
#Recipe to Clean Up Ugly Ruby
ack -l "######" | xargs ruby -i.bak -ne 'print if not /######/'
# check with git diff
find . | grep '\.bak$' | xargs rm
# See http://m.onkey.org/running-rails-performance-tests-on-real-data | |
# fixed to work with Rails 3.2.15 | |
# START : HAX HAX HAX | |
# Load Rails environment in 'test' mode | |
ENV["RAILS_ENV"] ||= "test" | |
require File.expand_path('../../config/environment', __FILE__) | |
# Re-establish db connection for 'performance' mode | |
ActiveRecord::Base.establish_connection(:performance) |
#!/bin/bash | |
MONGO_DATABASE="bingo" | |
MONGO_HOST="127.0.0.1" | |
MONGO_PORT="27017" | |
MONGODUMP_PATH="/usr/bin/mongodump" | |
BACKUPS_DIR="/home/some-user/database-backups/cronned" | |
BACKUP_NAME="latest" |