Skip to content

Instantly share code, notes, and snippets.

@makenai
Forked from rixth/gist:4022687
Created November 6, 2012 05:06
Show Gist options
  • Save makenai/4022695 to your computer and use it in GitHub Desktop.
Save makenai/4022695 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
repo = `basename \`git rev-parse --show-toplevel\``.strip
sha = `git rev-parse HEAD`.strip
file= "~/Dropbox/Code/gitshots/#{Time.now.to_i}-#{repo}-#{sha}.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