MySQL Character Encoding

I encountered a funky problem on this very site where certain characters in my news feeds were getting garbled in the database. I suspected it was a Unicode/UTF-8/etc problem, and upon exploration I discovered this suggestion. First backup the table(s) with the offending data:

$ mysqldump -uusername -ppassword --add-drop-table --default-character-set=latin1 database table > backup.sql

Then restore the table(s) with the following command:

mysql -uusername -ppassword --default-character-set=utf8 database < backup.sql

MD5 "Message Digest" Utility

MD5 is an algorithm for generating a digital signature from a message of indeterminate length. It can be used as a form of encryption but is also useful for ensuring data has not been corrupted during transmission.

Under Mac OS X, the "md5sum" terminal command allows the generation and verification of md5 checksums. An md5 checksum file will typically have a ".md5" extension. To verify data integrity from an existing md5 file, issue the following terminal command:

$ md5sum -c 

Installing Apache 2 on Mac OS X 10.4 (Tiger)

Apache 2 offers many improvements over Version 1.3 that comes with Mac OS X 10.4. That's probably why it comes with Mac OS X 10.5! For those of you who are just hankering for Apache 2 but not quite ready for the move to Leopard, here's how it's done. Roll up your sleeves, boys & girls...

Disable Apache 1.3

The first thing you have to to is disable the Apache 1.3 web server. In the "System Preferences" app, go to "Sharing", and turn off "Personal Web Sharing".

Download & Install

Analog - Apache Log File Analyzer

I learned about Analog through a friend whose web site is hosted at Cornerhost. I loved the taglines after "You'll fine three things here:"

Cornerhost uses a GNU/GPL utility called "Analog", a well-designed and very customizeable utility which reads Apache's standard log file format, processes and formats the data into HTML code. Point your browser to the resulting output for an easy and clear method of analyzing your web server's access logs.

Adobe File Browser

This was a "nice" add-on with PhotoShop 7 which became a true "feature" in PhotoShop CS with the ability to enlarge previews to a reasonable size without a loss in image quality (even without using "generate high-quality previews - see below).

So I'm flush in a world of cheap storage and my 80GB laptop drive makes me feel "crowded". But ok, I have my external drive (a HUGE plus for the recent global reinstall), DVD backups, and so on.

What's In Your Laptop Bag?

Show me by posting a comment with your image. Be sure to include a description. Maximum width of your image should be 530 pixels.

I'll start...
Name: Charles
Occupation: Photographer
Charles Laptop Bag
The one thing in my laptop bag (besides my laptop) I can't live without: My Sonos Digital Music System

Force Eject a CD/DVD in Mac OS X

Occasionally when I eject a CD or DVD using the normal Mac OS X methods (either pressing the "eject" button on the keyboard or dragging a volume to the trash", the volume disappears, but the disc doesn't come out. Every time this happens, I browse the usual troubleshooting sources (eg., macosxhints.com), and find the unhelpful procedure using the Terminal "hdiutil" utility. This only works if the volume is mounted.

FireWire vs. USB

FireWire is the Apple Inc. name for the IEEE 1394 interface which operates at a bandwidth of 400Mbps. Since it supported a much higher bandwidth than USB 1.1, it was well suited for applications requiring large amounts of data transfer (scanners, disk drives).

FireWire interfaces first appeared in the PowerMac G3 (Blue & White), the iMac 350MHz (3rd generation), PowerBook G3 "Pismo", and second-generation iBook "clamshell" models.

GD on Mac OS X/Apache 1.3/PHP 4

As my web applications for artists became more sophisticated, I realized the value in having the ability for the app to dynamically resize images, say, to create thumbnails when an image is uploaded. Under PHP, the obvious choice is the GD libraries. While GD was available on my production server, I had to install it on my Mac OS X development platform. I found the procedure which I've included below.

Subscribe to