git + webcam = lol
Takes a snapshot with your Mac's built-in iSight webcam every time you git commit code, and archives a lolcat style image with it.
By default, the lolimages are stored by a Github style short SHA in a
~/.lolcommits directory created for you.
- ImageMagick (
brew install imagemagickassuming you are on a mac using Homebrew)
- RMagick and ruby-git gems (
bundle installwhen in this directory)
- ImageSnap (included)
The boring way
bin/imagesnap to somewhere in your
lolcommit.rb a post-commit hook in the repo you want it to run for.
The awesome way (works for multiple repos)
rake install. This will do the following:
- Clone and install the git-hooks project (adding it to
- Creates your global user
~/.git_hooksand gives you a few directories to start (pre-commit, commit-msg, and post-commit).
- Copies the main script here (
lolcommit.rb) to your new
bundlerto install any uninstalled Gem dependencies (assuming bundler is installed, manually
gem install bundlerif not, we don't auto-install it to be polite.)
homebrewto install ImageMagick (assuming Homebrew is installed, we don't auto-install it here to be polite.)
Once this is done, simply run
git hooks --install while in any repository you want to use this in.
This installs git-hooks which gives you a global user hooks directory so you can set up other stuff easily as well. See their README for more details.