03.08.10

Gmail from Exodus

Posted in Open Source, Uncategorized at 1:13 pm by chris

It looks like the Exodus XMPP/Jabber client has a new home here. I found out because a friend had signed up of a gmail account and wanted to use a real chat client. As an old Jabber user I told her about Exodus.

01.29.10

Website setup.

Posted in Uncategorized at 8:00 pm by chris

This seems obvious but it’s really handy to have my website setup with DAV access to the backend for administration purposes. I’ve recently setup on of my sites this way and it works out quite nicely.

01.12.10

Split horizon, Bind, and reloading zones

Posted in Uncategorized at 12:25 pm by chris

I always have to look this up. To reload a zone on bind 9 where the server is running split horizon you need: rndc reload Class is almost always going to be “in”. In my case this works out to: rnd reload example.com in inside

12.21.09

bogofilter and the corrupt wordlist.db

Posted in Uncategorized at 6:44 pm by chris

Looks like something burped on my mailserver and my bogofilter wordlist got too big. Probably something to do with limits anyhow. In any case I was looking for a way to recover from the issue and came across this pearl in the Bogofilter FAQ. Well, the advice is incomplete. If you really hose up the database then bogoutil -d will stop printing  entries before the end of the database. The next recovery step is to use the db utilities: db_dump and db_load to fix the database. db_dump -r (on FreeBSD db_dump-<version>) dumps the database into a text file and db_load creates a text file from a word list. The problem is that the advice in the bogofilter faq is out of date. It looks like there are some parameters that have to be specified. My solution: use db_dump without the -r that creates a broken database with a default header. Copy the header into the new text file and then append the output of db_dump -r to that. Et voila!

10.30.09

Alright, it’s no longer 1998!

Posted in Uncategorized at 4:39 pm by chris

One thing that really ticks me off the web designer conversation where your web design guy insists on designing to an 800×600 screen resolution to ensure that your pages will be accessible by everyone on the web. Today I ran across this nugget (opens in a new window). I’ve always said that this is so 1998 yet I’ve had this conversation as recently as 2007. Well, if you dissect the table you come up with this:

Width
1920×1200 2.27%
1680×1050 8.72%
1440×900 18.37%
1366×768 20.76%
1280×1024 —-
1280×800 —-
1280×768 58.09%
1152×864 61.04%
1024×768 94.94%
800×600 100.00%
Height
1920×1200 2.27%
1680×1050 8.72%
1280×1024 21.97%
1440×900 31.62%
1152×864 34.57%
1280×800 56.92%
1366×768 —-
1280×768 —-
1024×768 94.94%
800×600 100.00%

That’s right. If you design for 1024×768 you reaching nearly 95% of all the web browsers that participated in this survey. Now web designers can partly like it’s 2004!

07.18.09

Deceptionocracy

Posted in Uncategorized at 5:33 pm by chris

If you’re expecting something about the latest Transformer movie, I’m sorry to disappoint. This venting of my spleen concerns or societies move towards a deception-ocracy. I’m coining a new word o describe a system where the market protects those producers who do the best job of deceiving their customers. The credit card companies have been doing this ever since they discovered that they make more money from customers who cannot pay of their bills. There entire business model now is to deceive people into getting in so deep that they can’t pay off their balances. They live fat and happy on the finance charges. It used to be that credit card companies were happy to make money from yearly fees they charged consumers and the convenience fee that they charged merchants. But that changed when they started offering consumers cards with no annual fee as a means of boostin customer retention. It wasn’t long before Jack Welch famously called the people who paid off their GE platinum cards in full each month “Dead Beats” because they didn’t make any money for the GE. The financial analysis is spot on but I can’t help but think that Jack’s got something wrong there.

I’m currently dealing with a PC from eMachines. If you know me you know that as far as windows recovery goes I’m with Ripley, Hudson, and Cpl Hicks on the recovery of Windows machines that have been hit with viruses: “I say we take off and nuke the entire site from orbit. It’s the only way to be sure.” In a normal world when you spend $400.00 on a PC the manufacturer includes recovery media at a cost to him of about $2.00. Apparently, eMachines is so starved for cash that the extra $2.00 is the difference between staying in business and not. It’s too bad considering that the overwhelming majority of Windows boxes would benefit from a periodic re-install even if there were no viruses. And that re-install process changes the recovery media from a luxury item into a must have. Or, perhaps Acer/eMachines has found a way to turn the $2.00 recovery media into a profit center generating $18.00 in “handling fees”.

03.17.09

Dante

Posted in Uncategorized at 1:41 am by chris

In Dante’s Inferno there were circles in hell designed to separate the ordinary sinner: the guy who designed the keyboard I’m working with (which provides no feedback when a key has been struck for example) from the guy who deliberately put the “global nuclear war” button right next to the “toast apple poptarts” button. My  “9th circle of hell award” goes to the guys who designed the firewall that I’m working with lately. It appears that in their wisdom they’ve chosen to implement the “Red Alert — all hands on deck” alarm for the following scenario. You have a server connected to a client via tcp. The server is a fairly recent linux box that can do RFC1323 extensions. The client is a boring Windows XP box with a TCP RWin size of 65536 bytes. Between them is a Comcast business class Cable connection. In this scenerio the Windows box is trying to download a file from the server on the Comcast connection. The problem is literally that the connection is too fast for the Windows XP Box to fully cope. Nowadays when I test Comcast Cable connections I’m surprised to see anything less than 25Mbit/s.In whole numbers thats 25,000,o000 bits / sec. In more familiar units that 312.5 kBytes /s. The problem is that I’m starting to see firewalls that see this as an issue because they have been programmed with very conservative specifications about what constitutes a denial of service attack. I’m seeing firewalls that scream DOS when they are connected to a Business Cable modem line and have clients with tcp receive window size of 65536 bytes. Why? it’s simple. On aBusiness Cable line with 25Mbits/s download rate you have to be able to buffer 96kbytes/s in tcp windows just to keep up with a server (or client) at the other end of a fast line. These firewalls are calling DOS because  the other end can fill their TCP window and then some. The right thing to do is to watch. If the otherside wants to DOS you he’ll send many packets after your Rwin is filled. If he’s just a really fast server on a really fast pipe. He’ll respect your RWin and quit sending. If you’re firewall decides to be agressive and drop the connection (by proactively sending a TCP RST) then you should probably act accordingly.

My thanks to Chuck Skuba on this post. I have to be 100% and fess up that I gathered the data but he did the homework.

– Chris

08.14.08

Pantone Huey/MacBook success

Posted in Uncategorized at 6:22 pm by chris

A while ago I found the Pantone Huey on closeout at my local Circuit City. At $80.00+ I didn’t consider it much of a bargain but at $25.00 it didn’t look like such a bad deal. I fired up the device on my MacBook and began the disappointment. It turned my display Green. On my Mac Mini with my Samsung Display it was pretty good. If you don’t know it the point of this device is to tune your display’s color so that when you process a photo and then print it you don’t get surprised by the difference between what your monitor and printer consider to be fully saturated blue. At $25.00 I figured that it would be ok with the Mini. I was on vacation for a while and would have good access to the Apple Store and Genius bar so I packed the Huey along. But that was still no news. Then I ran into this link.    a At the bottom they discuss the Huey and it looks like it doesn’t like the polarization of the MacBook Screen. On calibration it wants to be oriented vertically but I found that it gave me a good calibration oriented horizontally.

06.23.08

FreeBSD’s geom makes life easier.

Posted in Uncategorized at 9:29 am by chris

FreeBSD’s geom is the missing link that I’ve been searching for. Geom is an abstraction for mass storage providers and consumers which really cleans up the mass storage layer in Unix. In geom your disk drive combined with it’s driver is a mass storage provider. The filesystem layer is a mass storage consumer. Geom provides the glue in between providers and consumers which allows greatly enhanced function. Encrypted or compressed storage can be easily built using this framework.

I’m using geom with the automounter, amd to revamp my use of removable media. If you use the new gnome framework gnome’s hald does this also but it requires the user to unmount the drive. I like using amd here. Even though there’s a slight performance penalty amd will automatically unmount the drive for you after a configured period of inactivity. I find that this is an effective way of getting around one of Unix’s quirks. Unix doesn’t react well with a piece of the filesystem just disappears which is what happens when you remove a mounted USB stick. Amd can be configured to unmount the stick 30 seconds after you’ve stopped using it. Doing this almost eliminated the resulting kernel panics and length fscks that I experienced when I first started using USB storage.

The automounter is a utility that was designed to mount storage into the filesystem on demand. It works by providing an NFS look alike storage system. You literally mount the automounter into a directory in the filesystem. The automounter is configured with a map that assigns different directories within it’s filesystem to different pieces of mounted storage. So if amd is providing the directory /Volumes and has a mapping for MyUsbStick when you try to get a directory listing of /Volumes/MyUsbStick, the automounter has all the information needed to do the mount and provide access to the filesystem beyond. So far that’s about even.

Without geom that was a nice enough setup. But when the kernel attaches your usb stick in FreeBSD it gives it a name like /dev/da0s2e or /dev/da1s1. It’s easy enough to figure out what this means. da0s2e is the “e” partition on the second slice of the first “SCSI” drive in the system. USB and firewire drives a psuedo SCSI drives in FreeBSD and in Linux because the SCSI protocol was flexible enough to serve as the model for mass storage. But what happens if you have two systems and one of them has a SCSI controller in it or if you have two USB sticks. SCSI drives are number in the order in which they appear on the system so for the man with two USB sticks the whether they are connected as Drive a is da0s2e and drive b is da1s2e or vice versa depends on the order in which you plug them in. It turns out that geom embraces the concept of a volume label and can create a shadow device based on that label.

To use this feature of geom load the kernel module geom_vol_ffs (Available in FreeBSD from 6.x onwards) then add a label to your FreeBSD filesystems using the tunefs command:

# tunefs -L “MyLabel” /dev/da0s2e

Then you should end up with a device entry for your disk called /dev/vol/MyLabel

Have fun

– Chris

09.26.07

More stuff about Postgresql that should be obvious.

Posted in Uncategorized at 1:13 pm by chris

I’ve been scratching my head on this one for far too long. I have a query under Postgresql which retrieves the distance between too points given the knowledge of their zipcodes. This work because I have an incomplete table of mileages between arbitrary three digit zipcode pairs. Each time I use this table my queries take a long time and I could never understand why. It has to do with the type that postgresql assigns to computed text fields. I was doing something like this:

SELECT * FROM worklist INNER JOIN partial_zipcode_mileage ON SUBSTRING(worklist.origin_zipcode, 1, 3) = partial_zipcode_mileage.origin_partial_zipcode...

The issue here is the type of the expression: SUBSTRING(worklist.origin_zipcode, 1, 3) as compared to the type of the field partial_zipcode_mileage.origin_partial_zipcode. The latter is a SQL CHAR(3) since it will always hold 3 characters. Postgresql assignes the first expression a type of TEXT since it has know way to know how bit a field you actually want. This prevents the postgresql engine from using the index and this, my query takes along time. Substitute SUBSTRING(worklist.origin_zipcode, 1, 3)::char(3) in the statement and all is happy.

« Previous entries Next Page » Next Page »