Setting up lolcommits
Table of contents
To get the most from this post, you’re gonna need to really read through it. But, basically I walk you through how to setup
lolcommitsup for yourself locally and automatically post captures to Tumblr.
➡️ Check out my rogerisworking Tumblr
Check out the latest source for
Getting started (Link to this header)
This guide makes some assumptions that you’re using the terminal to run the following commands, and that you’re using Mac hardware and software.
lolcommits is pretty easy via Ruby Gems. If you’ve got the
command on your computer, you can simply run the following command.
After it installs, you can make sure it’s available by running
Great. Now that the binary is installed and in your
$PATH, we can focus on
customizing it. I personally use it to post everything I commit as a photo to a
Tumblr I made specifically to cope with the dehumanizing
aspects of working with computers.
Feel free to skip around to any of the following sections.
- Initializing teh lulz
- Customizing teh lulz
- Configuring teh lulz
- Automating teh lulz
- Setting up your
- Synchronizing your
Initializing teh lulz (Link to this header)
To get started you can run
lolcommits --enable within any git repository you’d
like. This does a few things which are pretty destructive if you use the
post-commit hook. So make sure you back it up.
Now you can safely run
Which will give you the following output inside of
Customizing teh lulz (Link to this header)
Now that we’ve got the hook installed, you can make your first commit and see
what it’s all about. You’ll notice on the
post-commit file that line 6 is just
a call to
lolcommits --capture. This is what takes the commit image. It
accepts some additional flags to customize your experience. Feel free to play
around with them.
Once you run the
--capture command within a repo with commits, you can see
your lolcommit image by running
lolcommits --browse. This will open the
Finder.app to the folder containing all the lulz. It’s useful to keep this
open as you tweak your
lolcommits --capture ** command so you can preview your
Here’s the command I use to capture my lovely commits:
I find that
--fork allows me to quickly capture commits. The
helps me forget it’s taking a picture, even though the green light will still
turn on. The
--delay=3 is great so that the iSight camera can focus on you.
--animate=5 is what gives me
*.gif files that I can later upload to
Tumblr. This means I don’t get any
*.jpg files. I personally don’t mind losing
them, but if you want you can always run the command twice once without the
Configuring teh lulz (Link to this header)
There are quite a few plugins available for
lolcommits that do
all sorts of fancy things. The one I like to use is the Tumblr plugin, since I
don’t want to worry about hosting or theming of my lolcommits.
To configure Tumblr, you just need to follow the prompts after running the configuration command.
Each prompt will walk you through the steps needed to enable the Tumblr
configuration. Once you’ve successfully configured the plugin,
config.yml file for you in the
config.yml is what tells
lolcommits what configurations to
use after it creates an image. You can take a look at the source for the
Tumblr plugin here.
Automating teh lulz (Link to this header)
Once you’ve gotten a single repository enabled and tweaked to your liking, you
might want to ensure that all of your newly cloned repositories and old
repositories are using
lolcommits to capture your beautiful selfie. This can
be very time consuming as you’d need to run
lolcommits --enable within each
repository and then copy over the
config.yml file into that new folder
$HOME/.lolcommits. Or you could automate it.
Now, this has less to do with
lolcommits and more to do with
init function, which is called on
git clone and
git init within a
directory, supports a template directory. This directory
can be anywhere in your system and referenced within your global Git
configuration file ( ie
Setting up your
(Link to this header)
To setup your
git_templates/ directory, you can follow these commands:
Once you’ve configured
git to recognize the
$HOME/.git_template directory as
git init template directory, you can copy the
post-commit file that
lolcommits generated in the repository you ran
lolcommits --enable and
tweaked to your liking above.
This will insure that
git init and
git clone copies over the
file into the repositories
.git/hooks/ directory. Now every repository you
clone or create on your machine will have
lolcommits enabled by default.
Fun Fact: This is a feature of
lolcommitsso you can use it for any other git-hook templates you’d like to copy over into new repositories.
(Link to this header)
Once you’ve created a
config.yml file that automatically uploads things to
Tumblr, you need to make sure to copy that file over to each directory within
$HOME/.lolcommits/. I keep my base
config.yml at the root-level of the
$HOME/.lolcommits/ directory and copy it over using the following command
whenever I’m working with a new repository on my machines.