Skip to content

Instantly share code, notes, and snippets.

View landtax's full-sized avatar

Santi Bel landtax

View GitHub Profile
@landtax
landtax / VIM indent XML
Last active December 12, 2015 00:09
XML LINT for indenting XML in VIM
1,$!xmllint --format --recover - 2>/dev/null
@landtax
landtax / prepare-commit-msg
Created May 24, 2012 12:46
add refs #xxx to commit message
#!/usr/bin/env ruby
message_file = ARGV[0]
message = File.read(message_file)
branch = `git branch`.scan(/\* (.*)/).flatten[0]
exit 0 if branch == "master"
issue_no = branch.scan(/(\d{3,})/).flatten[0]
exit 0 if issue_no.nil?