Removing duplicate “Open with” applications on the Macintosh

Starting with Mountain Lion, I have noticed that I will often see the same program listed multiple times when right-clicking on a document to use the “Open With” functionality. For example, I just updated TextMate (which seems to be updated very regularly lately) and my Open With menu looked like this: To fix this problem, […]

Setting UTF-encoding with a PHP header

Sometimes, I need to write a one-off PHP script to export/import data from a database, for example. Since I am not using any kind of front-end interface, I have found that I sometimes have to specifically set the encoding on the page to avoid any extended character issues with the database. I use: header(‘Content-Type: text/html; […]

Right aligning an image with a caption for Outlook HTML email

If you ever wanted a nostalgic trip back to the early days of web development, I recommend coding an HTML email. Nothing brings back the memories of table-based layout like creating an email. Before it was Netscape 4 that we had to worry about… now, we have the joy of working with Outlook’s Word-based HTML […]