Skip to content

Instantly share code, notes, and snippets.

#Sort the Ruby files in your project by LOC
find . -iname "*.rb" -type f -exec wc -l {} \; | sort -rn
@jstorimer
jstorimer / tclient.rb
Created June 25, 2013 21:09
These scripts were the result of the "Faster Rails test runs...with Unix!" screencast at https://www.youtube.com/watch?v=RSehcT4MnRM.
#!/usr/bin/env ruby
require 'socket'
test_file = ARGV[0]
socket = UNIXSocket.new('testing.sock')
socket.write(test_file)
socket.close_write
@JoshuaEstes
JoshuaEstes / 000-Cheat-Sheets.md
Last active May 1, 2024 04:03
Developer Cheat Sheets for bash, git, gpg, irssi, mutt, tmux, and vim. See my dotfiles repository for extra info.
@seanbehan
seanbehan / Gemfile
Created March 27, 2012 16:49
Capistrano Multi Stage Deploy
gem 'capistrano', '~> 2.11.2'
gem 'capistrano-ext', '~> 1.2.1'
gem 'capistrano_colors', '~> 0.5.5'
@rsierra
rsierra / gmaps4rails2_hack.rb
Created December 26, 2011 14:57
Hack to use gmaps4rails acts_as_gmappable with rails 2
module Gmaps4rails
module ActsAsGmappable
def self.included(base)
base.extend ClassMethods
end
module InstanceMethods
# This is a before_filter to trigger the geocoding and save its results
set conf_name to text returned of ¬
(display dialog ¬
"Enter conference name:" with title ¬
"Schedule Conference" default answer ¬
"" default button 2)
tell application "OmniFocus"
tell default document
set newProject to make new project with properties {name:conf_name}
@danopia
danopia / database.yml
Created April 25, 2011 04:19
Default SQLite database.yml
# SQLite version 3.x
# gem install sqlite3-ruby (not necessary on OS X Leopard)
development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".