Skip to content

Instantly share code, notes, and snippets.

@andreruffert
Last active August 29, 2015 14:22
Show Gist options
  • Save andreruffert/6265a6da54342ca87593 to your computer and use it in GitHub Desktop.
Save andreruffert/6265a6da54342ca87593 to your computer and use it in GitHub Desktop.
.gitshots - take a selfie every time u commit
#!/bin/sh
# Run `chmod +x pre-commit` to make it executable then put it into .git/hooks/.
##
# gitshots
#
# Requires imagesnap from https://github.com/alexwilliamsca/imagesnap (brew install imagesnap)
# Create a .gitshots directory at the same level as the .git directory.
# To assemble the video use http://www.dayofthenewdan.com/projects/tlassemble
##
FILE=$(dirname $0)/../../.gitshots/$(date "+%s").jpg
echo "Taking capture into" $FILE
/usr/local/bin/imagesnap -q -w 3 $FILE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment