Memoize in Clojure is cool. Memoize is even built in to the core Clojure API. Resetting the built-in version is impossible since the atom used as a cache is hidden in a closure, but it’s easy to write a custom resettable version. Here are two versions that we came up with on IRC today. Print [...]
A fast and efficient way to download historic stock data from Yahoo! Finance with Ruby.
jQuery’s Tablesorter is easily customizable to sort by absolute value or anything else you’d like. In my case, I have a column of “standard deviations above or below the mean” that I want to display sorted by absolute value. This was pretty easy with a little Javascript code. Print PDF
Clojure-mode for Emacs will clobber any line-final commas, even if they’re embedded in a string literal. O_o
I just read “A Constructivist Take on the Strait” by Max Tsung-Chi Yu. The information on Taiwanese internal politics with regard to China and of the various nations’ stances towards growing Chinese power was interesting and informative. What I disliked was the explicitly intersubjective analysis of the “One China, different interpretations” declaration. Intersubjectivity and notions [...]
Omerta by Mario Puzo is entertaining during a long airplane ride, even if it falls short as Great Literature. Like The Godfather before it, there is plenty of Machiavellian intrigue to unravel and various betrayals and plot twists to keep your attention. Perhaps more than its predecessor, Omerta suffers from pervasively flat and stereotypical characters [...]
So I wanted to write a cron job on my Mac. Just run this script every day at midnight. Nothing fancy. In standard Unix, this is one line in a crontab: 0 0 * * * /some/script That’s it. Put that in your crontab and /some/script will run every day at midnight. Naturally, I typed [...]
The shared key (password) used to encrypt a WPA2 wireless connection to a DD-WRT router has a maximum length associated with it. If the key you enter is too long, it won’t work. (This may also be the case for other encryption protocols besides WPA2; I haven’t tried.) Unfortunately, the web interface does not limit [...]
The DD-WRT forum has some cargo cult tech support floating around on the topic of blank pages and the inability to update settings after a firmware upgrade. Many people are saying that you must use Internet Explorer to flash your router to DD-WRT, or else you will get a blank page (at apply.cgi) that does [...]