Skip to content

Instantly share code, notes, and snippets.

View rmcafee's full-sized avatar

Rahsun McAfee rmcafee

View GitHub Profile

Keybase proof

I hereby claim:

  • I am rmcafee on github.
  • I am rmcafee (https://keybase.io/rmcafee) on keybase.
  • I have a public key ASBxIlsjcm_oRnL5xVGq-GpOrYFxU1_H1uj--LDRhcnHzwo

To claim this, I am signing this object:

@rmcafee
rmcafee / keybase.md
Created March 18, 2014 14:46
keybase.md

Keybase proof

I hereby claim:

  • I am rmcafee on github.
  • I am rmcafee (https://keybase.io/rmcafee) on keybase.
  • I have a public key whose fingerprint is A538 8C87 706D E546 70AB DEBA 66B7 9B59 3C5B 6838

To claim this, I am signing this object:

@rmcafee
rmcafee / hash_extend.rb
Created May 19, 2009 18:18
Extend Ruby Hash with Useful Methods
class Hash
def except(*blacklist)
{}.tap do |h|
(keys - blacklist).each { |k| h[k] = self[k] }
end
end
def only(*whitelist)
{}.tap do |h|
(keys & whitelist).each { |k| h[k] = self[k] }