Tuesday, July 31st, 2007
Question: I just accidentally added a misspelled word to Firefox’s built in dictionary — how do I remove it?
This is a good question! Thankfully, someone at Mozilla decided the user dictionary should be stored in plain text and newline delimited. A big thank you from Chris on this one!
The only challenge is locating your Profile and then your personal / user dictionary file. The personal dictionary is called persdict.dat and lives in your Firefox Profile folder.
The Firefox Profile Folder is located in different places depending on what Operating System you are using:
- Windows XP:
C:\Documents and Settings\%USERNAME%\Application Data\Mozilla\Firefox\Profiles\????????.default\
- Windows Vista:C:\Users\%USERNAME%\AppData\Roaming\Mozilla\Firefox\Profiles\????????.default\
- Mac OS X:
~/Library/Application Support/Firefox/Profiles/????????.default/
- Linux:
~/.mozilla/firefox/????????.default/
If you are using Windows XP or Windows Vista you can quickly jump to the directory by typing “%APPDATA%\Mozilla\Firefox\Profiles\” into the run box (click on Start–>Run).

Once you have found your profile folder you need to edit the persdict.dat file. Using your favorite text editor open up that file and edit out / add in the words you desire.
You will need to restart Firefox before it will see any words you updated.
Tuesday, July 17th, 2007
When your SSL keys and certificates fall out of sync let the headaches begin.
Here is a common error from apache:
Error: “Unable to configure RSA server private key”
Check to see if they are in sync using openssl. Compare the modulus values of both the key and the certificate. Here is how to get the modulus information out of the public key file and the certificate file:
Certificate File:
openssl x509 -noout -text -in [certificate_filename] -modulus
Public Key File:
openssl rsa -noout -text -in [public_key_filename] -modulus
Tuesday, July 17th, 2007
For users of linux and unix one command which is useful is uptime. The uptime command allows you to view the amount of time the server has been running since its last reboot or cold start. If you are administering a Windows machine there is no uptime command — however; this trick will give you a similar result!
I present “uptime” for Windows:
PS: to run this click on Start–>Run and enter CMD — hit enter and then type “net statistics server” into the MS-DOS emulated window and hit enter.
Friday, July 13th, 2007
In an attempt to add the PECL Upload Progress package, I received the following error:
[root@zebra cbschuld]# pecl install uploadprogress-beta
downloading uploadprogress-0.3.0.tgz ...
Starting to download uploadprogress-0.3.0.tgz (4,677 bytes)
.....done: 4,677 bytes
3 source files, building
running: phpize
sh: phpize: command not found
ERROR: `phpize' failed
Hmmm, it turns out I never added the package php-devel (oops). If you are missing phpize on your machine add it with:
Tuesday, July 10th, 2007
Parsing out email addresses is a tedious task. This task hits my desk on a consistent basis. Usually, in my case, the list is coming out of Outlook. If the target list is coming out of Outlook make sure you export using Tab Separated for DOS (thus, click on File–>Import/Export–>Export to a File–>Tab Separated (DOS)–>[select_the_target_folder]). Take this target file and execute this command:
cat [filename] | grep -o -P "[[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(local|aero|coop|info|museum|name|([0-9]{ 1,3})|([a-zA-Z]{2,3}))]*"
Alternatively I usually need a list of unique addresses:
cat [filename] | grep -o -P "[[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(local|aero|coop|info|museum|name|([0-9]{ 1,3})|([a-zA-Z]{2,3}))]*" | sort -u
Thursday, July 5th, 2007
One of the challenges of maintaining a MySQL server loaded with customer data is backing up the customer data on timed intervals without editing the backup script(s) each time you add a customer or database. I wrote this script to process the backups automatically for me.
#!/bin/sh
#
# Script places all backup files in the current working directory
#
DB_USER=user
DB_PASS=password
DB_HOST=localhost
MYSQL_DUMP_OPTIONS="--add-locks --allow-keywords --extended-insert --lock-all-tables"
DATE_TIME=`date +%Y%m%d.%H%M%S`
for db in `echo "show databases;" | mysql -h $DB_HOST -u $DB_USER --password="$DB_PASS" | grep -v -P "(Database|information_schema|test)"`
do
mysqldump $MYSQL_DUMP_OPTIONS -h $DB_HOST -u $DB_USER --password="$DB_PASS" $db | gzip > $db.$DATE_TIME.sql.gz
done