Voltar ao ranking

lolcommits/lolcommits

Rubylolcommits.com

:camera: git-based selfies for software developers

gitgit-addonswebcamselfiehumor
Crescimento de estrelas
Estrelas
4.8k
Forks
246
Crescimento semanal
Issues
40
2k4k
out. de 2011set. de 2016ago. de 2021jul. de 2026
ArtefatosRubyGemsgem install lolcommits
README

lolcommits

CI Depfu Gem Ask DeepWiki

git-based selfies for software developers

lolcommits takes a snapshot with your webcam every time you git commit, archiving a "LOLcat" style image. Git blame has never been so much fun!

Sample images

Gallery
grid of captured lolcommit images

Feel free to add your own lolcommit to the People Using Lolcommits page!

Requirements

Installation

macOS

You'll need ImageMagick installed. Homebrew makes this easy.

brew install imagemagick

Then install with:

gem install lolcommits

Optionally add ffmpeg if you plan on capturing animated gifs or videos.

brew install ffmpeg

Linux

Install dependencies using your package manager of choice. For example in Ubuntu:

sudo apt-get install mplayer imagemagick libmagickwand-dev

For Ubuntu 14.04 or newer, you'll need to manually install ffmpeg, as it no longer ships with the base image (download here).

Then install with:

gem install lolcommits

For more details, see Installing on Linux.

Windows - here be dragons!

It works, but you'll need to follow some extra instructions to get dependencies installed. See Installing on Windows.

Usage

Enabling and basic usage

Within any git repository, simply run

lolcommits --enable

Now any git commit will automatically trigger a lolcommit capture! lolcommits are stored in ~/.lolcommits with a short sha filename and organized into folders for each git repo.

Follow these steps to enable lolcommits across all your repos; using git init and the init.templatedir setting.

Don't worry about it too much, half the fun of lolcommits is forgetting it's even installed!

Other commands

OK, if you insist... Since you know about --enable, common sense suggests there is also a repository specific --disable, hopefully you can guess what that does.

Other handy common commands include --last, which will open for display your most recent lolcommit, or --browse, which pops open the directory containing all the lolcommit images for your current repository.

Use --help for a full list of available commands.

TIP: Any extra args you pass with --enable are auto-appended to the git hook capture command. For example;

lolcommits --enable --delay 2 --animate 4 --fork

Configures capturing of an animated gif (4 secs) after a 2 sec delay in a forked process.

Capture configuration options

lolcommits has some capture options for additional lulz. You can enable these via environment variables like so;

  • LOLCOMMITS_DEVICE set a webcam device - except windows (non-animated) captures
  • LOLCOMMITS_VIDEO (in seconds) set time for capturing a video - requires ffmpeg
  • LOLCOMMITS_ANIMATE (in seconds) set time for capturing an animated gif - requires ffmpeg
  • LOLCOMMITS_DELAY (in seconds) set delay time before capturing (for slow webcams to warmup)
  • LOLCOMMITS_FORK fork lolcommit runner (capture command forks to a new process, speedily returning you to your terminal)
  • LOLCOMMITS_STEALTH disable all notification messages when capturing
  • LOLCOMMITS_DIR set the output directory used for all repositories (defaults to ~/.lolcommits)
  • LOLCOMMITS_CAPTURE_DISABLED disables lolcommit capturing in the commit hook (when set as 'true')

Or apply arguments directly on the git hook capture command (located in your repository's .git/hooks/post-commit file).

  • --device {name} or -d {name}
  • --video {seconds} or -v {seconds}
  • --animate {seconds} or -a {seconds}
  • --delay {seconds} or -w {seconds}
  • --fork
  • --stealth

You can configure lolcommit text layout, font styles (type, size, color etc.) or add a transparent overlay to your images. Simply configure the default loltext plugin with this command:

lolcommits --config -p loltext

To find out more about styling, read about the loltext options.

Use lolcommits --devices to list all attached video devices available for capturing.

Finally, lolcommits --help has details on all available arguments.

Videos

You can tell lolcommits to capture an mp4 video (instead of an image). ffmpeg is required and can be installed like so;

To enable, use the -v {seconds} option or set the LOLCOMMITS_VIDEO environment variable with the number of seconds to capture.

Animated Gifs

Animated gifs can take a while to generate (depending on the number of seconds you capture and the capabilities of your machine).

To enable, use the -a {seconds} option or set the LOLCOMMITS_ANIMATE environment variable with the number of seconds to capture. If you find animated capturing takes too long, try setting LOLCOMMITS_FORK=true.

Example animated lolcommit
gif

NOTE: If both LOLCOMMITS_ANIMATE and LOLCOMMITS_VIDEO options are set, the video duration takes precedence and is applied to both captures.

Plugins

A growing number of plugins are available, allowing you to transform or share your lolcommits with others.

The default loltxt plugin simply appends your commit message and sha to the captured image. Others can post to Twitter, Tumblr or HTTP Post anywhere. You can even translate your commit messages to lolspeak.

Check them out on our plugins page.

To list all installed plugins use:

lolcommits --plugins

Installed plugins can be easily enabled, configured or disabled with the --config option:

lolcommits --config
# or
lolcommits --config -p loltext

Interested in developing your own? Follow this plugin developers guide.

Timelapse

Watch your face rapidly decay while you program! Enjoy (or despair) with:

lolcommits --timelapse
# or for just today's lolcommits
lolcommits --timelapse --period today

Development

Check out this repo and run bundle install to install dependencies.

Tests

Cucumber is used for testing. Run the full suite with:

$ cucumber

Some MiniTest unit tests can also be ran with:

$ rake test

Linting

Rubocop is used for linting, and a git quickhook can be installed to check this on a pre-commit.

$ rubocop

$ quickhook install

Docs

Generate docs for this gem with:

$ rake rdoc

Troubles?

Try our trouble-shooting FAQ, or take a read through our wiki.

If you think something is broken or missing, please raise a Github issue.

History

Originally created by @mroth in 2011 (as a joke project for Hack && Tell), lolcommits has grown considerably, has a plugin ecosystem and is now maintained by @matthutchinson.

Thanks to all the contributors and users throughout the years!

License

The program is available as open source under the terms of LGPL-3.

Repositórios relacionados
github/gitignore

A collection of useful .gitignore templates

Creative Commons Zero v1.0 Universalgitignoregit
175k82.3k
Chalarangelo/30-seconds-of-code

Coding articles to level up your development skills

JavaScriptnpmCreative Commons Attribution 4.0 Internationalawesome-listjavascript
30secondsofcode.org
128.5k12.5k
bregman-arie/devops-exercises

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

PythonPyPIOtherdevopsaws
83.3k19.8k
jesseduffield/lazygit

simple terminal UI for git commands

GoGo ModulesMIT Licensecligit
80.6k2.9k
sharkdp/bat

A cat(1) clone with wings.

Rustcrates.ioApache License 2.0command-linetool
59.8k1.6k
tiimgreen/github-cheat-sheet

A list of cool features of Git and GitHub.

MIT Licenseawesomeawesome-list
git.io/sheet
58k5.4k
go-gitea/gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD

GoGo ModulesMIT Licensegiteagolang
gitea.com
57k6.9k
gogs/gogs

The painless way to host your own Git service

GoGo ModulesMIT Licensegogsgo
gogs.io
47.7k5.1k
usebruno/bruno

Opensource IDE For Exploring and Testing API's (lightweight alternative to Postman/Insomnia)

JavaScriptnpmMIT Licenseapi-clientgit
usebruno.com
45.8k2.7k
cli/cli

GitHub’s official command line tool

GoGo ModulesMIT Licensegithub-api-v4cli
cli.github.com
45.4k8.7k
files-community/Files

A modern file manager that helps users organize their files and folders.

C#MIT Licensefluent-designxaml
files.community
44.4k2.8k
logseq/logseq

A privacy-first, open-source platform for knowledge management and collaboration. Download link: http://github.com/logseq/logseq/releases. roadmap: https://logseq.io/p/NX4mc_ggEV

ClojureGNU Affero General Public License v3.0knowledge-basegraph
logseq.com
44k2.7k