Skip to content

Instantly share code, notes, and snippets.

@carlosgaldino
Created March 11, 2013 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosgaldino/5136270 to your computer and use it in GitHub Desktop.
Save carlosgaldino/5136270 to your computer and use it in GitHub Desktop.
# Configure post-commit hook to take a photo
function gimage() {
cp ~/.post-commit-image .git/hooks/post-commit
}
#!/usr/bin/env ruby
file="~/.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 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment