Skip to content

Instantly share code, notes, and snippets.

@headius
headius / gist:5783237
Created June 14, 2013 16:19
Example of nondeterministic insertion order in MRI
xt-jruby-local ~/projects/jruby $ cat blah.rb
expected = (0...100000).to_a * 50
array = []
50.times.map do
Thread.new do
100000.times do |i|
array << i
end
@johncant
johncant / .rspec
Created April 9, 2013 12:51
Colourise your jenkins CI output for a Ruby on Rails app
# Put this in your .rspec for verbose and coloured output. Don't include this comment.
--colour --format documentation
@TimFletcher
TimFletcher / 20120625030355_add_deleted_at_to_user.rb
Created November 7, 2012 17:05
Trashable 'concern' for Rails models
# db/migrate/20120625030355_add_deleted_at_to_user.rb
class AddDeletedAtToUser < ActiveRecord::Migration
def change
add_column :users, :deleted_at, :time
end
end
@jrochkind
jrochkind / gist:2161449
Created March 22, 2012 18:40
A Capistrano Rails Guide

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".