Skip to content

Instantly share code, notes, and snippets.

View donovanh's full-sized avatar

Donovan Hutchinson donovanh

View GitHub Profile
alias hometime = git checkout -b hometime && git push origin hometime && git add --all & git commit --all -m "hometime push"
@donovanh
donovanh / gist:5814722
Last active December 18, 2015 16:58 — forked from oisin/gist:4444722
A handy bash prompt customization that shows the working directory followed by the current branch, and an asterisk if the branch is dirrrrty.
# Highlighting on prompt
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
COLOR_NONE="\[\e[0m\]"
parse_git_branch() {
git_status="$(git status 2> /dev/null)"
branch_pattern="^# On branch ([^${IFS}]*)"
@donovanh
donovanh / 0_reuse_code.js
Created October 3, 2013 15:56
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
/*
* twitter-entities.js
* This function converts a tweet with "entity" metadata
* from plain text to linkified HTML.
*
* See the documentation here: http://dev.twitter.com/pages/tweet_entities
* Basically, add ?include_entities=true to your timeline call
*
* Copyright 2010, Wade Simmons
* Licensed under the MIT license