Skip to content

Instantly share code, notes, and snippets.

View ethanwhite's full-sized avatar

Ethan White ethanwhite

View GitHub Profile
@ethanwhite
ethanwhite / nbviewer_bookmarklet.js
Created October 17, 2012 01:33 — forked from jiffyclub/nbviewer_bookmarklet.js
A bookmarklet that tries to open the current page in nbviewer. White space has been trimmed for brevity. To use make a new bookmark and copy the code below into the URL field.
javascript:date=new Date();
url_root='http://nbviewer.ipython.org/';
url=null;
gist=location.href.match(/^https?:\/\/gist.github.com\/([0-9]+)$/);
if (gist) {
url = url_root + gist[1];
} else {
path=location.href.match(/^https?:\/\/(.*\.ipynb)$/);
if (path) {
url=url_root + 'url/' + path[1];}}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ethanwhite
ethanwhite / gource-multiple-repositories.sh
Created May 2, 2012 15:14 — forked from anonymous/gource-multiple-repositories.sh
Generates gource video out of multiple repositories.
#!/usr/bin/env bash
# Generates gource video (h.264) out of multiple repositories.
# Pass the repositories in command line arguments.
# Example:
# <this.sh> /path/to/repo1 /path/to/repo2
i=0
for repo in $*; do
# 1. Generate a Gource custom log files for each repo. This can be facilitated by the --output-custom-log FILE option of Gource as of 0.29:
logfile="$(mktemp /tmp/gource.XXXXXX)"