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.
Ruby
Pull request Compare This branch is 3 commits ahead, 892 commits behind mroth:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
bin
Gemfile
README.md
Rakefile
lolcommit.rb
moo

README.md

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.

Prerequisites

  • ImageMagick (brew install imagemagick assuming you are on a mac using Homebrew)
  • RMagick and ruby-git gems (bundle install when in this directory)
  • ImageSnap (included)

Installation

The boring way

Copy bin/imagesnap to somewhere in your $PATH. Make lolcommit.rb a post-commit hook in the repo you want it to run for.

The awesome way (works for multiple repos)

Run rake install. This will do the following:

  • Copy imagesnap to /usr/local/bin
  • Clone and install the git-hooks project (adding it to /usr/local/bin)
  • Creates your global user ~/.git_hooks and gives you a few directories to start (pre-commit, commit-msg, and post-commit).
  • Copies the main script here (lolcommit.rb) to your new ~./git_hooks/post-commit directory.
  • Uses bundler to install any uninstalled Gem dependencies (assuming bundler is installed, manually gem install bundler if not, we don't auto-install it to be polite.)
  • Uses homebrew to 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.

Sample images

Please add your own lolcommit to these samples! Just fork this repo, add it to this section of the README, and send me a pull request.