Skip to content

Instantly share code, notes, and snippets.

View bronzehedwick's full-sized avatar
🐌
digging in

Chris DeLuca bronzehedwick

🐌
digging in
View GitHub Profile
@bronzehedwick
bronzehedwick / GitHub status CLI
Last active December 20, 2015 21:19
Check github status from the command line
# GitHub provides a simple json api for it's status updates (status.github.com). jq is a very nice command line json parser http://stedolan.github.io/jq/.
# Combine the two, and you have a nifty GitHub status check, right from the command line!
# Add the following alias to your .bashrc or .zshrc; rename as you wish
ghs='curl https://status.github.com/api/last-message.json | jq .'
@bronzehedwick
bronzehedwick / prepare-commit-msg.sh
Created June 13, 2013 20:20
Git hook that inserts the current branch name in the commit title. Good for structures where the current branch = the ticket name. To install, rename this file to prepare-commit-msg and put it in .git/hooks.
#!/bin/sh
ORIG_MSG_FILE="$1"
TEMP=`mktemp /tmp/git-XXXXX`
TICKET=`git rev-parse --abbrev-ref HEAD`
(echo $TICKET": "; cat "$ORIG_MSG_FILE") > "$TEMP"
cat "$TEMP" > "$ORIG_MSG_FILE"
@bronzehedwick
bronzehedwick / gist:3984550
Created October 31, 2012 02:57
Edit gitignore alias
# Simple shortcut to edit your gitignore
# from anywhere inside your git repository
# Note that this will only work for gitignores
# in the top level directory
# To use, copy and paste the code
# into your bashrc or zshrc
alias egi="vim $(git rev-parse --show-toplevel)/.gitignore"