Code
Random pieces of code that I've released to the world. Probably not
useful to anyone but me.
A simple HTML validator that twigs when it sees bad html tags (used by
spammers to obfuscate their email messages). An example would be
the word doctor. Obfuscated, it'd be written
doc</gargle>tor, which will look the same when
rendered to the screen, but looks quite different
to a keyword search system.
Documentation is at the top of the file.
Updated: bad_tags is now a bit more savvy to MS
bizarreness which swings through the emails once in a
while.
I've got a directory tree full of patches. I needed some way
to automatically update their overviews on a nice page. This
is a bash script to do that for me, which has been cron'd to
run nightly at 3am. You can see a (short) sample of what it
generates over here.
Documentation at the top of the file.
I need random numbers, lots of them, and good ones, too.
This is one of the best ones of the current crop of
generators, made one of the giants in the field, George
Marsaglia. It's fast, it's uniform, it's good for lots and
lots of uses. on my 750MHz PIII laptop, it generates ~114
million unsigned longs per second. Since light travels
186 282 miles in one second, or roughly 1 foot per nanosecond,
this means that the routine generates a random number in
the time that it takes for light to travel nine feet.
Hard to get much better than that.