The dreaded xsane "Invalid argument" and an easy fix

I was trying to get scanning working yesterday on my HP LaserJet 3390. However, I was hitting the dreaded message about

failed to open device hpaio:/net/<my_device_here> Invalid argument

I tried just about everything. I read gobs of results in Google. Some said to upgrade HP LIP, some said …

View comments.

more ...

When el6 won’t apply a default route

I was doing some network reconfiguration on a box recently. I was switching from a static IP setup (which was originally configured during install) to a DHCP setup.

Problem was, regardless of what I did, I could not get the default route from the DHCP server to apply. I end …

View comments.

more ...


Resetting user password in Serendipity

I lost my password to my account on a Serendipity blog recently, but still had access to the database. I did some code digging, and figured out how to reset a user’s password.

First, you have to figure out your install’s hash key:

SELECT name, value FROM s9yconfig …

View comments.

more ...

Fixing heavy disk activity (excessive IO) in KMail

A while back, I noticed KMail was starting to run really slowly, and was responsible for a few megabytes per second of disk IO (as reported by iotop). I did some google searching, and found a reference to a possible problem with importing large folders from older versions of KMail …

View comments.

more ...

When localhost isn’t localhost: Apache and OpenLDAP

Today I was troubleshooting an issue with Apache and LDAP authentication via the OpenLDAP server. I had copied an existing configuration to a new system (Debian Etch to Ubuntu 10.04). Most everything was working (logins via PAM and LDAP, and the like). However, authentication via Apache’s LDAP BasicAuth …

View comments.

more ...


BetweenDict, a Python dict for value ranges

I was doing some programming today (no, really?) and had need of a data structure that would return a value based on the key falling within a given range. Kind of like a dict, but each key in the dict would be two values, between which the querying key would …

View comments.

more ...


Don’t use strptime, use a regex

I am using Python to do some data file processing, converting data from a horrendously verbose, repetitive format to a nice, clean, CSV format. The date and time are in two different fields, and the date is in MM/DD/YYYY format, plus, the MM and DD might be one …

View comments.

more ...