Skip to content

Instantly share code, notes, and snippets.

View royaldark's full-sized avatar

Joe Einertson royaldark

  • Minneapolis, MN
View GitHub Profile
(def idx-a {:a [[:a 1] [:a 2]]
:b [[:b 3]]
:c [[:c 4]]
:d [[:d 2]]})
(def idx-b {1 [[:a 1]]
2 [[:a 2] [:d 2]]
3 [[:b 3]]
4 [[:c 4]]})
(defn process-group
@royaldark
royaldark / post-checkout
Last active August 29, 2015 13:57
post-checkout git hook: Run `npm install` if package.json has changed
#!/usr/bin/env ruby
from_commit, to_commit, checkout_type = ARGV
# If type is 0, this is a single-file checkout; abort.
if checkout_type.to_i == 0
exit 0
end
files_changed = `git diff --name-only #{from_commit} #{to_commit}`