View gist:951011
// This bookmarklet provides a way to navigate "related link" tags, like <link rel="Prev"... /> <link rel="Next"... />.
// Copy and paste this into a bookmark:
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src=""+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.5.2",function($,L){var d=$("<div/>");$("link").each(function(){d.append($("<a/>").attr("href",$(this).attr("href")).text("["+$(this).attr("rel")+"] "+$(this).attr("title")));d.append("<br/>")});$("body").prepend(d);});
// Original source, before minifying and JQuery-enabling.
// minify:
// jQuery-enabling:
var d = $('<div/>');

I began to want a tabular format and Github-flavored-markdown was becoming too tedious, so I moved this to Google Docs: datagrok's anime favorites

Text below is not yet incorporated into that spreadsheet


  • Anything with music by Susumu HIRASAWA (= Anything written, directed, or animated by Satoshi KON).
  • Anything with music by Yoko KANNO.
"""Colorscheme builder
Future improvements: Twisting the 'hue' knob in HSV
colorspace isn't necessarily the best way to procedurally
choose colors. I'd like to explore the use of other
"perceptual" colorspaces like L*A*B* for calculating
uniform hue spreads.
View output.html
p {width: 20em;}
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Does my
sparkline <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAAPAgMAAADFfETiAAAADFBMVEX/////AACAbIAAAAAe6DapAAAAWUlEQVR42m3OKw7AQAgE0BEVc6wVK3osRAXH7vBZUlHEwEsgAQtZu/LCjyPCdkyZYzt27AfLfGwyZF+GtE7Sd9llKp3RybZZTGO2tacnSIzZzvga5a5yNOAFUsco8dm3E2wAAAAASUVORK5CYII="> fit in a nice paragraph of text? Ut enim
assert = require 'assert'
# Imagine some function fn(x). For example:
fn = (x) -> x+1
# We want to build from a given Array of keys an Object whose values represent
# the result of that asyncronous function. For example,
input_keys = [
View gist:2199506

Virtualenv's bin/activate is Doing It Wrong

I'm a Python programmer and frequently work with the excellent [virtualenv][] tool by Ian Bicking.

Virtualenv is a great tool on the whole but there is one glaring problem: the activate script that virtualenv provides as a convenience to enable its functionality requires you to source it with your shell to invoke it. The activate script sets some environment variables in your current environment and defines for you a deactivate shell function which will (attempt to) help you to undo those changes later.

This pattern is abhorrently wrong and un-unix-y. activate should instead do what ssh-agent does, and launch a sub-shell or sub-command with a modified environment.


# usage: Downloads/grevious_injury.jpg "fuck fucking fuck\ni am so angry over trivial annoyances\ni wish you physical bodily harm"
convert "$1" \
-brightness-contrast "-10x-20" \
-resize 1920x1920 \
'''This is a python port of
import ldap
# To do:
# - encode search string as UTF-8
N="`readlink \"$1\"`"
mv -T "$1.stage" "$1"
ln -s "$N" "$1.stage"
rm -rf "$N"
cp -aH "$1" "$N"

Ideas for improvements to git log --graph

I will maybe someday get around to dusting off my C and making these changes myself unless someone else does it first.

Make the graph for --topo-order less wiggly

Imagine a long-running development branch periodically merges from master. The git log --graph --all --topo-order is not as simple as it could be, as of git version

It doesn't seem like a big deal in this example, but when you're trying to follow the history trails in ASCII and you've got several different branches displayed at once, it gets difficult quickly.