Skip to content

Instantly share code, notes, and snippets.

@rathgar
Created February 1, 2013 18:01
Show Gist options
  • Save rathgar/4692946 to your computer and use it in GitHub Desktop.
Save rathgar/4692946 to your computer and use it in GitHub Desktop.
git `post-commit` hook to take your photo every time you commit.
#!/usr/bin/env ruby
hash = `git log -1 HEAD | head -1 | awk '{print $2}'`
`streamer -q -s 640x480 -c /dev/video0 -o docs/images/#{ENV['USER']}/#{hash.strip}.jpeg`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment