Server-side mail filtering

Does anyone know of a simple way to filter emails with a certain header (like, "X-Spam-Status: Yes") into a specific maildir using a .qmail file? I seem to remember coming across a line that would do this, but after an hour or so of Googling, I can't find it. I'm sure that if it's possible, it's really simple and obvious, but my brain is officially dead tonight. I could do it with a perl script, but I'd rather not reinvent the wheel if I don't have to.

Camera phones as mice

This is cool, although I don't see why it's limited to just spotcodes. Theoretically, I think you could apply the same algorithms that are used in optical mice to make camera phones work as input devices. You couldn't use them as traditional mice (unless you placed it on a self-illuminating surface such as a display), but you could detect rotations and (and to a lesser extent, translations) in three dimensions. Thoughts?

Google Knows All

Today I created an image (which I will link to later) of Visio being on crack (i.e. not displaying text or icons on its menus), and mentioned the URL only three times on IRC. A few hours later, I was looking through my web server logs, and somehow Google had discovered the file! As far as I know, it's not linked to anywhere (including any type of automatic index created by Apache). My two hunches are 1) Someone's making logs of the channels I'm in available on his/her web site, or 2) Google's toolbar is reporting URLs back to Google to be spidered later.

Come to think of it, it's probably someone using the Google toolbar with the PageRank(TM) meter turned on. When Google got a request for the PageRank(TM) of an unrecognized URL, it logged that URL to be spidered later. This has interesting privacy implications, because a secret URL you share with someone might not remain one (think naked photos and Google's image search).

Kinda scary.

Attention VNC geeks

Recently, malerin graciously donated his old 17" monitor to me. Originally, I had planned to upgrade Melissa's old 15" monitor (in use as my second monitor) to malerin's 17", and use the 15" for a computer in the bedroom, but then I had a better idea: If two monitors are better than one, three must be better than two!

Of course, my laptop only has one VGA out port, so I can only physically connect one extra monitor (the laptop's LCD serves as the primary display). So, I had an idea: connect one monitor to my (currently) headless Linux box, and use VNC to connect to my laptop and display the right-most third of my extra-wide desktop.

It turns out that there doesn't seem to be a good way to do that. Windows thinks there's only two monitors, so the desktop won't extend past what's visible by the first two monitors. I found a program that uses a custom driver to do the same thing I want to do, but unfortunately VNC isn't able to see anything on the virtual monitor. I was thinking of setting my video card's drivers to use a virtual desktop that's bigger than the physically displayed one, but it seems that nVidia pulled that feature out of their drivers. I suppose I could always downgrade my drivers?

Anyway, it seems like the ideal situation would be to have a driver that emulates the video card, which would have two main advantages: my desktop would actually extend to a third virtual monitor, and the driver knows EXACTLY what's been updated on the display, so VNC doesn't have to keep polling. Ultr@VNC seems to use this approach, but the driver is binary-only for some reason (while the rest is open source), and that kinda scares me.

So, ideas?
Fuck the dmca!

New Userpic | Gratuitous Icon Post

I think my new userpic is rather self-explanatory. For those of you living in a cave or outside the US, the DMCA is a federal law that makes circumventing copy protection schemes, and devices that do so, illegal, among other things. Of course, the law tramples fair-use rights and has been greatly abused.

This isn't an ordinary userpic, though. Save the userpic to your hard drive, change the extension to .zip, and see what happens when you open it. I won't ruin the surprise, so the explanation of why it works is below the lj-cut.

WTF?Collapse )

Inside Check Numbers

As a follow-up to my previous post on credit card account numbers, I decided to document what the funny-looking numbers at the bottom of your checks represent, including how to calculate the check digits.


First, you might be wondering exactly why the numbers are printed in such a weird font. The reason lies in how these numbers are read. Back in the 70s, when the current routing system was devised, computers were unable to optically recognize characters. A technology called Magnetic Ink Character Recognition (MICR) was created to allow computers to read these characters. As a check goes through a MICR reader, the ink (containing ferrous metals) is magnetized. The ink then passes over a read head, similar to one used in tape players. Each character gives off a unique waveform that can easily and uniquely identify the character being passed over the read head. Therefore, each character was designed in such a way so that it gives off a unique waveform, yet is still human-readable.

The Routing Number

The routing number, contained between the two routing/transit start/stop symbols (), is made up of the following components:
XXXXFederal Reserve Routing Symbol
YYYYAmerican Bankers Association Institution ID
ZCheck digit

The Federal Reserve Routing Symbol

Usually, the first two digits of the Federal Reserve Routing Symbol indicate which of the twelve federal reserve districts the bank is in. Numbers in the range of 21 to 32, indicate a "thrift institution," although assignment of these numbers was ended in 1985. To get the Federal Reserve district number from one of these numbers, simply subtract 20. For example, if the first two digits is 32, it indicates it is a "thrift institution" in the 12th Federal Reserve district (the western US). Routing symbols that start with 00 indicate the check is issued by the US government (except federal banks). Routing symbols that start with 80 are reserved for travelers checks, and all others are reserved.

The third digit of the Federal Reserve Routing Symbol indicates which branch office of the district the check should be routed through. A 1 indicates the main office of the district, with digits 2-5 indicating a branch office. For example, in the 12th Federal Reserve district (the western US), 1 indicates San Francisco, 2 indicates Los Angeles, 3 indicates Portland, 4 indicates Salt Lake City, and 5 indicates Seattle.

The forth digit indicates the availability of funds. A 0 indicates immediate availability, a 1-5 indicates which state in the district the paying bank is located, and a 6-9 indicates a special collection arrangement.

The Federal Reserve Routing Symbol is the denominator in the transit number printed in the top-right corner of a check.

The ABA Institution ID

The full ABA institution ID is actually made up of two parts, separated by a dash. You can find the full ABA institution ID printed in the upper-right hand corner of your checks, as the numerator in the transit number. For example, it may look like: 96-1234. The part before the dash (the prefix) indicates the city or state the bank is located in. Numbers from 1 to 49 represent cities, while numbers from 50 to 99 indicate states. For states, numbers 50-58 represent eastern states, 59 represents Alaska, Hawaii, and US territories, 60-69 represent southeastern states, 70-79 represent central state, 80-88 represent southwestern states, and 90-99 represent western states.

A full list of the ABA prefixesCollapse )
The second part of ABA institution ID is limited to 4 digits, and is included in the MICR routing number. Since there are more than 10,000 institutions in the US, this number is obviously not unique to an institution. However, it is assigned so that it is unique inside the ABA prefix and Federal Reserve branch office area. Therefore, its meaning is not ambiguous inside the MICR routing number.

The Check Digit

The check digit ensures the number was read or keyed in without error. The algorithm used to compute the check digit of the routing number is as follows:

Take the first, fourth, and seventh digit, multiply them by 7, and add them to the total.
Take the second, fifth, and 8th digit, multiply them by 3, and add them to the total.
Take the third and sixth digit, multiply them by 9, and add them to the total.

The check digit is the 1s digit of the total. Note that if you take the check digit, multiply it by 9, and add it to the total, the sum will be evenly divisible by 10.

The Account Number

The account number precedes the ANSI "on-us" symbol (). The check digit algorithm is the same as the one used to verify the routing number. However, because account numbers are of variable length, it can be somewhat tricky to determine which multiplier to use with what digit. The best way to go about it is to work backwards from the last digit of the account number, not including the check digit. Working backwards, the pattern of multipliers is 3-7-9. For example, if you have the account number 123456, you would compute the check digit like so:

Account Number123456

Sum of products = 121, which means the check digit is 1.
  • Current Music
    The Marconi Show