China’s Anti-Secession Law

This is some scary stuff. China seems to be such a loose canon when it comes to Taiwan. Good writeup on Wikipedia on the laws around unification.

27 Words

Mighty Leaf Teas

I drink a lot of tea, a couple cups a day at work. A cup to get me going in the morning, then the flavored, non-cafinated ones after that as a drink. I’m always on the look out for a good tea. Enter Mighty Leaf, sold at Whole Foods among other places. It’s great tea, plus it’s the best bag packaged tea I’ve seen yet — the whole leaf tea is sealed in little silk pouches that are stiched shut. It’s also a local Nor Cal company, to boot.

89 Words

Terror 2001 Back Online

On September 11, 2001 I took snapshots of a bunch of web pages as the days events unfolded and put them online. I just tried to hit it today and the site’s been broken since I reorged it a few months ago. And it’s back up.

44 Words

PictureViewer Available for Download

I use the Windows Picture and Scanner Wizard whenever I’m taking pictures off of my digital camera, so all of my pictures are stored in neat little albums. When I wanted to put these online, I couldn’t find a good ASP.NET that I could just point at this directory structure and make it work. Thus, a long time ago, I wrote PictureViewer. It’s a small little ASP.NET application that does thumbnailing, caching, pagination, image-prefetching and the like. I’m making my picture viewer available under the zlib license to whoever wants to consume it.

Setting it up should be super simple.

  1. Download and unpack the zip on your IIS web server and edit the web.config file.
  2. There are a couple of key configs. ImageDirectory points to your   picture collection. ThumbDirectory points to where you want the thumbnails cached. I suggest making a directory for thumbnails in your ImageDirectory. It’s smart enough not to show the thumbnail folder in the album view if it’s in your ImageDirectory.
  3. Add script mappings in IIS for .jpg, .gif and .avi to point to ASP.NET (see this image for an example)
  4. Ensure that IIS had read access to your image directory and write access to the thumbs directory

That’s about it. Let me know if you end up using it or have any feedback.

Download PictureViewer v1.0.

229 Words

SimplePersist v1.0 – A Simple Object Persistance Library

Often times when writing apps, I hate writing framework code to support persisting objects and structures to disk. So, I wrote a quick and dirty little library that allows you to persist and restore any object from disk. It’s made available in open-source form under the zlib license written in C#. There are three commands, Put, Get and Delete. Put takes an arbitrary object and saves it, Get retrieves all objects of the type given to it and Delete deletes and instance of an object.

// create a persistance manager
PersistManager mgr = new

// create a few classes I want to save
ExampleClass example1 = new
ExampleClass example2 =
example2.Firstname = “Otherfname”;
example2.Lastname = “otherlastname”;

// save them down

// get them back
object[] saved = mgr.Get(typeof
foreach(ExampleClass o in

Download SimplePersist v1.0.

142 Words

Tuesday Night Fun

On my way home from the gym last night Derek gave me a call saying he had a spare ticket to a concert at the Warfield. Not really knowing who was playing (some guy named Gavin de Graw and Michelle Branch’s new band) I was down and showed up around 9. As I walked in I noticed a huge amount of pubescent teens and wondered what, exactly, this concert was about and as crossed in to the venue I saw a poster declaring: “One Tree Hill Tour.” D’oh! In any case, the concert wasn’t bad. The show wasn’t bad, the Michelle Branch band was good and soulful and Gavin de Graw was a great vocalist. Afterwards, Derek and I went to Anu and had a drink while shooting the breeze. Anyway, being able to do things like this is why I love living in the city.

145 Words


Unbelievable: John, Jeff, Arthur, Swap and I have managed to put together a trip to Vegas for late April. We’ve been trying to get this trip going since early January and finally it’s happening. When the five of us get together, it’s always stupid fun. This rocks.

47 Words

Farewell, My Concubine

Just finished watching Farewel, My Concubine. Quite an interesting movie (although a bit long) about two friends in the Bejing Opera, from childhood to adult hood and the various dramas therein. One aspect of the movie that I found the most facinating, and what must be a genere in China, is the effects of the Cultural Revolution and communism on China. One of my favorite Chinese movies is To Live, which also starred You Ge and Li Gong. It’s a fantastic drama, also spanning some 40 or 50 years of a man and his family through the social upheaval of China. It’s directed by Yimou Zhang, who is of more recent fame for directing Hero and House of Flying Daggers, both of which I have yet to see.

126 Words