Skip to content

Instantly share code, notes, and snippets.

@zhaoz
zhaoz / updatechromium.sh
Created February 21, 2012 23:13 — forked from benvanik/updatechromium.sh
Update Chromium on Linux to the latest version
#!/bin/bash
cd ~/Downloads/
if [ ! -x /usr/bin/curl ]; then
echo "Didn't find curl at /usr/bin/curl. Install with 'sudo apt-get install curl'."
exit 1
fi
echo -n "Determining latest build... "
@zhaoz
zhaoz / emailer.sh
Created January 4, 2011 08:40
emailer
#!/bin/bash
FILENAME=$1
if [ -z "$FILENAME" ]; then
echo "First argument must by file of emails and names"
exit 1
fi
FROM="Xing Yi <xingyi@u.washington.edu>"
@zhaoz
zhaoz / gist:672103
Created November 11, 2010 06:16
closures in python
def getHeight(self, node=None):
maxHeight = [0]
def traverse(node, height):
if not node:
return
height += 1
if height > maxHeight[0]: