Skip to content

Instantly share code, notes, and snippets.

View willkg's full-sized avatar

Will Kahn-Greene willkg

View GitHub Profile
@willkg
willkg / commit-msg
Created July 10, 2013 02:16
commit-msg hook for translating all commit messages into Pirate using dennis.
#!/bin/bash
(cat < $1 | dennis-cmd translate - | tail -n "+2" > $1.tmp) && mv $1.tmp $1
# We always exit 0 in case dennis-cmd fails. Then you get your
# original commit message. No one likes it when goofy shenanigans
# break your stuff.
exit 0;
@willkg
willkg / git-wtfamipushing
Created February 27, 2013 22:23
shows a log --oneline of the sha in production and head
#!/bin/bash
set -o errexit
USAGE=""
. git-sh-setup
INPROD=`curl -s "https://support.mozilla.org/media/revision.txt"`
echo "You are about to push:"
@willkg
willkg / git-branchls
Created December 13, 2012 23:25
git-branchls: command for showing you list of local branches, shas and dates you last touched them sorted by age
#!/usr/bin/env python
import subprocess
import sys
import datetime
GITCMD = '/usr/bin/git'
@willkg
willkg / git-rik
Created August 22, 2012 20:55
prints the branches from a specified remote
#!/bin/bash
set -o errexit
USAGE="<remote>"
. git-sh-setup
test $# -lt 1 && usage
@willkg
willkg / git-branchls
Created May 14, 2012 15:39
git-branchls
#!/usr/bin/env python
# Lists all the local branches, short sha, and how many days ago the last
# commit on the tip of that branch was.
#
# This makes it easier to identify and clean up branches that have landed.
import subprocess
import sys
@willkg
willkg / reverse_recruit_template.rst
Last active November 21, 2021 21:14
reverse recruit email template

Below find the "reverse recruit" template. I'm using it. So can you!

===

Hi!

I'm not currently looking for a job as I'm pretty happy at my current job.

However Mozilla is hiring into a variety of positions. Mozilla also has

@willkg
willkg / n7y.py
Created September 19, 2011 19:47
converts a long string into a shorter one
#!/usr/bin/python
# Copyright (c) 2011 Will Kahn-Greene <willg@bluesock.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions: