Skip to content

Instantly share code, notes, and snippets.

@consti
Created July 10, 2012 09:57
Show Gist options
  • Select an option

  • Save consti/3082406 to your computer and use it in GitHub Desktop.

Select an option

Save consti/3082406 to your computer and use it in GitHub Desktop.
Take a photo of you, whenever you make a commit
#!/bin/sh
#
# Take a photo of you, whenever you make a commit
#
# > brew install imagesnap
# Save this file as ~/.git_templates/hooks/post-commit
# then do:
# > chmod +x ~/.git_templates/hooks/post-commit
# > git config --global init.templatedir '~/.git_template'
#
# this will add the post-commit to all new repositories.
# To add to an existing one, run
# > git init
# in the repository.
#
forked_image() {
mkdir -p ~/.git_shots
imagesnap -q -w 3 ~/.git_shots/$(date +%s)_$(basename $PWD).jpg &
}
forked_image &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment