Skip to content

Instantly share code, notes, and snippets.

@chadmiko
chadmiko / opposite_of_array_intersection.rb
Created June 9, 2017 21:46 — forked from awesome/opposite_of_array_intersection.rb
Ruby opposite of array intersection
# Ruby opposite of array intersection... or maybe the method is missing from my brain bc not enough coffee
# http://twitter.com/soawesomeman/status/8035087261
def awesome(ar_1, ar_2)
(ar_1 + ar_2) - (ar_1 & ar_2)
end
awesome([1,2,3,4], [3,4,5,6]) # => [1, 2, 5, 6]
@chadmiko
chadmiko / .rspec
Created February 5, 2013 06:59 — forked from coreyhaines/.rspec
--colour
-I app

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

For those of you who get this error after upgrading to mountain lion:
Installing rmagick (2.13.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/user/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
extconf.rb:128: Use RbConfig instead of obsolete and deprecated Config.
checking for /usr/bin/gcc-4.2... no