os x

Dollar gaining ground

Even though the dollar is gaining on the euro, this seems a bit ridiculous:

1 euro = 0,169 dollars

The Unit Converter widget has been doing this for some time now...

How to enable single window mode in Safari

After browsing for a few hours in Safari it's possible to end up with a dozen windows or so because of links that open a new window (links with target="_blank"). I've always wished there was a way to have these links open in a new tab instead of a new window (sometimes referred to as single window mode).

In the latest Safari 3.1 Apple finally added a (hidden) preference! To enable single window mode and have all links open in a new tab that would normally have opened in a new window, we only need to enable the TargetedClicksCreateTabs preference using the following command (paste it into Terminal):

defaults write com.apple.Safari TargetedClicksCreateTabs -bool true

You might need to restart Safari before the setting is taken into effect. To disable the setting again, run the same command with false instead of true.

Have fun!

Update: thanks TUAW!

Update 2: check out my comment near the bottom for a possible way to do this on Windows. Update 3: I don't think The preference is not recognized in Safari for Windows.

Update 4: this setting does not appear to work in the Safari 4 Developer Preview.

Update 5: and it appears to be working again in the Safari 4 Developer Preview released on August 22nd!

Update 6: someone has been kind enough to point out that Safari 5.1 now has a user-facing preference that does this.

How to get eAccelerator working (again) after installing Security Update 2008-002 for Mac OS X Leopard

After installing the latest Mac OS X Leopard security update, namely Security Update 2008-002, my Apache stopped working. Apache's error log showed the reason why:

PHP Warning: [eAccelerator] This build of "eAccelerator" was compiled for PHP version 5.2.4. Rebuild it for your PHP version (5.2.5) or download precompiled binaries.\n in Unknown on line 0
PHP Fatal error: Unable to start eAccelerator module in Unknown on line 0

Alright, the eAccelerator extension I use to speed up PHP needs to be recompiled, because the security update has upgraded PHP (from 5.2.4 to 5.2.5). Should be easy, I thought.

A few commands later I had recompiled eAccelerator and restarted Apache by toggling the Web Server option in the Sharing preference pane, and... I got the same error. So, not so easy.