Skip to content

Instantly share code, notes, and snippets.

@josemarluedke
Created May 7, 2013 20:22
Show Gist options
  • Save josemarluedke/5535795 to your computer and use it in GitHub Desktop.
Save josemarluedke/5535795 to your computer and use it in GitHub Desktop.
Git hook for taking picture on commit
#!/usr/bin/env ruby
file="~/Drive/.gitshots/#{Time.now.to_i}.jpg"
unless File.directory?(File.expand_path("../../rebase-merge", __FILE__))
puts "Taking capture into #{file}!"
system "imagesnap -q -w 3 #{file} &"
end
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment