Skip to content

Instantly share code, notes, and snippets.

@djburdick
djburdick / rails_console_paths
Created January 26, 2013 21:44
rails test paths via console. #rails
1. rails c
2. app.root_path
@djburdick
djburdick / lower_process_priority
Created January 26, 2013 21:49
run a process at a lower priority. #linux
renice +15 pid
@djburdick
djburdick / git_commits_pre_date
Created January 26, 2013 21:50
git commits before a certain date. #git
git log --until "2011-01-01"
@djburdick
djburdick / show_bundler_gem_dir
Created January 26, 2013 21:51
show bundler gem directory. #rails, #bundler
bundle show rake
@djburdick
djburdick / check_if_port_used
Created January 26, 2013 22:02
check if a port is being used. #linux
netstat -ant | grep 8002
@djburdick
djburdick / mysql_show_index
Created January 26, 2013 22:06
mysql index info. #mysql
show index from table_name
@djburdick
djburdick / cruise_control
Created January 26, 2013 22:08
cruise control basics. #cruise_control
./cruise start
./cruise build project
./cruise build project --trace # with trace
./cruise add project --source-control git --repository
git@git.colo:project.git --branch project_branch # new project
@djburdick
djburdick / rake_migrate_down_version
Created January 26, 2013 22:09
migrate down a specific migration. #rails
rake db:migrate:down VERSION=20111213210111
@djburdick
djburdick / git_checkout_orig_local
Created January 26, 2013 22:11
git checkout origin to local. #git
git checkout -b local-name origin/remote-name
@djburdick
djburdick / redis_connected_clients
Created January 26, 2013 22:13
redis connected clients. #redis
redis-cli info | grep connected_clients
# edit nofile redis config to raise number of clients