Skip to content

Instantly share code, notes, and snippets.

View christianberg's full-sized avatar

Christian Berg christianberg

View GitHub Profile
@christianberg
christianberg / 0_reuse_code.js
Created June 3, 2014 09:42
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@christianberg
christianberg / magit-commit-babysitter-advice.el
Created December 11, 2012 09:14
Nice commit message enforcement for magit.
(defadvice magit-log-edit-commit (around magit-commit-babysitter)
"Make sure we have a nice commit message."
(let ((bad-commit-message nil)
(case-fold-search nil))
(save-excursion
(beginning-of-buffer)
(unless (string-match "[A-Z]" (string (char-after (point-min))))
(setq bad-commit-message "Commit message should begin with a capital letter."))
(end-of-line)
(if (> (current-column) 50)