Skip to content

Instantly share code, notes, and snippets.

{
"Total": 972,
"JavaScript": 324,
"Ruby": 188,
"Python": 88,
"PHP": 65,
"C": 53,
"Objective-C": 51,
"Java": 45,
"Shell": 31,
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
# Passes https://gist.github.com/mrocklin/5722155
def groupby(f, coll):
""" Group elements in collection by ``f`` """
d = dict()
for item in coll:
key = f(item)
if key not in d:
d[key] = []
d[key].append(item)
@TaurusOlson
TaurusOlson / ptml.py
Created August 7, 2013 10:22 — forked from kstep/ptml.py
#
# Python Template Markup Language
# Simple Python DSL for HTML and (a little) CSS templating.
#
# Example:
#
# from ptml import *
#
# with html5 as out:
# with head:
@TaurusOlson
TaurusOlson / git-prompt.sh
Created February 25, 2011 12:56 — forked from bdougherty/gist:125113
My git bash prompt
# Functions for displaying git branch and status
function get_git_branch {
git branch | awk '/^\*/ { print $2 }'
}
function get_git_dirty {
git diff --quiet || echo '*'
}
function get_git_prompt {
git branch &> /dev/null || return 1
echo "[$(get_git_branch)$(get_git_dirty)] "