Skip to content

Instantly share code, notes, and snippets.

@jguitar
jguitar / git-sequences.md
Last active December 11, 2015 04:48
Git sequences

Git

Finding a delete file in history

Find the file_path exactly
git log --diff-filter=D --summary
@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:

@jcf
jcf / active_record.rb
Created February 9, 2012 17:28
Backport pluck to Rails 3.1
# config/initializers/extensions/active_record.rb
module ActiveRecord
class Base
class << self
delegate :pluck, to: :scoped
end
end
class CollectionProxy
delegate :pluck, to: :scoped