This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Total": 972, | |
"JavaScript": 324, | |
"Ruby": 188, | |
"Python": 88, | |
"PHP": 65, | |
"C": 53, | |
"Objective-C": 51, | |
"Java": 45, | |
"Shell": 31, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Python Template Markup Language | |
# Simple Python DSL for HTML and (a little) CSS templating. | |
# | |
# Example: | |
# | |
# from ptml import * | |
# | |
# with html5 as out: | |
# with head: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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)] " |