Skip to content

Instantly share code, notes, and snippets.

@paolocarrasco
Created November 24, 2013 23:47
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 paolocarrasco/7634125 to your computer and use it in GitHub Desktop.
Save paolocarrasco/7634125 to your computer and use it in GitHub Desktop.
Capture pictures in your commits. Save this file as post-commit (without extensions) in your .git/hooks directory of your repository. Needs https://github.com/rharder/imagesnap Reference: https://github.com/rharder/imagesnap#git-hook-usage There is other that allows you to put the commit message in the picture (http://mroth.github.io/lolcommits/)
#!/usr/bin/env ruby
file="~/.gitshots/#{Time.now.to_i}.jpg"
puts "Taking capture into #{file}!"
system "imagesnap -q -w 3 #{file}"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment