Skip to content

Instantly share code, notes, and snippets.

let blacklists = ["*", "*://*", "*://*", "*://*/*.pdf"]
map jj <Esc>
map <C-d> scrollPageDown
map <C-u> scrollPageUp
map <C-f> scrollFullPageDown
map <C-b> scrollFullPageUp
map u lastClosedTab
map O :tabnew<Space>
map o :open<Space>

Keybase proof

I hereby claim:

  • I am crlane on github.
  • I am crlane ( on keybase.
  • I have a public key whose fingerprint is 2DEE 1D7E 6D28 C87D FB2C CA48 EA81 2985 3D57 CD15

To claim this, I am signing this object:

crlane /
Last active March 17, 2024 15:54
An implementation of a trie in python using defaultdict and recursion
from collections import defaultdict
def node():
return defaultdict(node)
def word_exists(word, node):
if not word:
return None in node
return word_exists(word[1:], node[word[0]])
crlane / jazimba.yml
Created September 25, 2014 14:39
jazimba tmuxinator
# ~/.tmuxinator/jazimba.yml
name: jazimba
root: ~/dev/jazimba
# Optional tmux socket
# socket_name: foo
# Runs before everything. Use it to start daemons etc.
pre: vagrant up
crlane /
Created July 8, 2014 14:43
print python source code
import subprocess
import os
START_DIR = '' # replace with your directory
DEST_DIR = '' # replace with your directory
CMD = 'enscript -1rG --line-numbers --highlight=python -p - --color=0 {} | pstopdf -i -o {}.pdf'
def print_source_code():
for dirname, subdirs, filenames in os.walk(START_DIR):
if 'env' in subdirs:
crlane /
Created June 29, 2013 18:56
I wrote this to generate a bunch of colorscheme previews from the highlight script at [here]( . YMMV.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, sys
from subprocess import call
_THEMES = '/usr/local/Cellar/highlight/3.12/share/highlight/themes/'
_CMD = 'highlight {} --output={} -O {} --line-numbers --font-size {} --font {} --style {} -W -J {} -j {}'
_OUTPUT = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'output/')
_TEST =os.path.join(os.path.dirname(os.path.realpath(__file__)), 'test/')
crlane /
Created December 27, 2012 01:55
Speaks the lyrics to 'Fitter Happier' from OK Computer. Requires python and Mac OS.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
Author: Cameron Lane
Description: Demonstration of the mac os x `say` command from within python.
import sys,os,urllib2