Skip to content

Instantly share code, notes, and snippets.

@srih4ri
Created September 5, 2015 07:38
Show Gist options
  • Save srih4ri/fd64536338b85a1bd966 to your computer and use it in GitHub Desktop.
Save srih4ri/fd64536338b85a1bd966 to your computer and use it in GitHub Desktop.
GitShots. One photo of you for each commit :)
#!/bin/sh
# Install fswebcam http://manpages.ubuntu.com/manpages/lucid/man1/fswebcam.1.html
#
# Copy this file to ~/.git-templates/hooks/post-commit
# and set `git config --global init.templatedir '~/.git-templates'`
# so each of your new projects get this hook installed by default.
#
file_name="$HOME/Pictures/gitshots/`date "+%s"`.png"
commit_msg=`git log -1 --pretty=%B`
fswebcam -q --title "$commit_msg" --no-timestamp --png --save $file_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment