Skip to content

Instantly share code, notes, and snippets.

@avdi
avdi / apology101.markdown
Created March 22, 2012 17:36
How to apologize

Chances are your head's spinning right now. That accusation of bias caught you off guard, you got kind of defensive, and now all hell has broken loose. You're feeling attacked on all sides. You're a good person at heart, and having all these people treat you like the antichrist is pretty upsetting.

You need to say something, but you're probably not in the best headspace to write copy right now. So to help you along, here's my 100% guaranteed-or-you-money-back scandal defusement apology template:

@holman
holman / gemspec-usage.md
Created February 12, 2012 07:02
test/spec/mini

Just install this in your apps like so:

gem 'test-spec-mini', :git => 'git://gist.github.com/1806986.git', :require => 'mini'

@nicholas
nicholas / gist:1665233
Created January 23, 2012 19:59
Installing Falcon's Ruby 1.9.3 Performance Patches
# Reference: https://gist.github.com/1658360
curl https://raw.github.com/gist/1658360/afd06eec533ad0140011bdaf652e6cd82eedf7ec/cumulative_performance.patch > $rvm_path/patches/ruby/1.9.3/p0/falcon.patch
rvm install 1.9.3 -n fast --patch falcon
rvm gemset copy 1.9.3-p0@global 1.9.3-p0-fast@global
rvm gemset copy 1.9.3-p0@plustrac 1.9.3-p0-fast@plustrac
bundle
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@PatrickTulskie
PatrickTulskie / resque_retry.rb
Created July 25, 2011 19:15 — forked from clemens/resque_retry.rb
Retry failed Resque jobs in Ruby
# inspired by http://ariejan.net/2010/08/23/resque-how-to-requeue-failed-jobs
# retry all failed Resque jobs except the ones that have already been retried
# This is, for instance, useful if you have already retried some jobs via the web interface.
Resque::Failure.count.times do |i|
Resque::Failure.requeue(i) unless Resque::Failure.all(i, 1)['retried_at'].present?
end
# retry all :)
Resque::Failure.count.times do |i|