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
#!/usr/bin/perl | |
# | |
# Eric Jiang | |
# http://notes.ericjiang.com/posts/54 | |
# This software is public domain. | |
# | |
# NOTE: This code is not maintained! | |
# There is a newer version written in C: | |
# https://github.com/erjiang/usbscale | |
# |
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
#!/usr/bin/env python | |
"""jsoncheck checks a list of filenames to see if they are valid json files. | |
Usage: | |
jsoncheck file1 [file2 file3 ...] | |
jsoncheck returns 0 if all files loaded successfully, and 1 otherwise. | |
""" | |
import json |
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
# pure-Python Douglas-Peucker line simplification/generalization | |
# | |
# this code was written by Schuyler Erle <[email protected]> and is | |
# made available in the public domain. | |
# | |
# the code was ported from a freely-licensed example at | |
# http://www.3dsoftware.com/Cartography/Programming/PolyLineReduction/ | |
# | |
# the original page is no longer available, but is mirrored at | |
# http://www.mappinghacks.com/code/PolyLineReduction/ |
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
[ui] | |
username = Eric Jiang <[email protected]> | |
editor = vim | |
merge = vimdiff | |
[extensions] | |
hgext.graphlog = | |
pager = | |
rebase = | |
color = | |
transplant = |
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
<?php | |
class BigClass { | |
function whatIsThis() { | |
echo __METHOD__ . ": " . get_class() . "\n"; | |
} | |
function whatIsThisNow() { | |
echo __METHOD__ . ": " . get_class($this) . "\n"; | |
} |
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
[user] | |
name = Eric Jiang | |
email = [email protected] | |
[core] | |
editor = vim | |
[color] | |
branch = auto | |
diff = auto | |
status = auto | |
[alias] |
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
榮恩 罗恩 [Luo2 en1] /Ron/ | |
赫敏 赫敏 [He4 min3] /Hermione (PRC)/ | |
妙麗 妙丽 [Miao4 li4] /Hermione (Tw)/ | |
格蘭傑 格兰杰 [Ge2 lan2 jie3] /Granger (character from Harry Potter)/ | |
斯内普 斯内普 [Si1 nei4 pu3] /Snape (PRC)/ | |
石內卜 石內卜 [Shi2 nei4 bu3] /Snape (Tw)/ | |
葛來分多 葛来分多 [Ge3 lai2 fen1 duo1] /Gryffindor (Tw)/ | |
鄧布利多 邓布利多 [Deng4 bu4 li3 duo1] /Dumbledore (PRC)/ | |
鄧不利多 邓不利多 [Deng4 bu4 li3 duo1] /Dumbledore (Tw)/ | |
麦格 麦格 [Mai4 ge2] /McGonagall (character from Harry Potter)/ |
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
#! /usr/bin/python2 | |
# vim: fileencoding=utf-8 encoding=utf-8 et sw=4 | |
import sys | |
import os | |
import xml.etree.cElementTree as ElementTree | |
import string | |
outroot = ElementTree.Element("osm", { "version": "0.6" }) | |
bldgroot = ElementTree.parse(sys.argv[1]).getroot() |
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
#!/bin/bash | |
# copied from https://github.com/exogen/dotfiles/blob/730fb8e2b72b2fc3aa3d90b889874bb5195e1d07/.profile#L65 | |
# Skip DASH manifest for speed purposes. This might actually disable | |
# being able to specify things like 'bestaudio' as the requested format, | |
# but try anyway. | |
# Get the best audio that isn't WebM, because afplay doesn't support it. | |
# Use "$*" so that quoting the requested song isn't necessary. |
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
#!/bin/bash | |
# Given image files, check the file to see if it has an embedded rating. If it | |
# does, write it to a RawTherapee sidecar file (.pp3), unless there already is | |
# a sidecar file. | |
for FILE in $* | |
do | |
RATING=`exiftool -p '$Rating' $FILE` | |
if [ "$RATING" -ne "0" -a ! -z "$RATING" ] |
OlderNewer