Skip to content

Instantly share code, notes, and snippets.

@rathgar
rathgar / post-commit
Created February 1, 2013 18:01
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`