How to fix a stuck Dock badge in OS X

Every now and then, I’ll get a Dock item with a notification badge that just won’t go away. It has happened with App Store, Calendar, Messages: an annoying red disk alerting me that some number of updates, invitations or conversations require my attention… except they don’t. The badge is stuck, an annoying vestige of some aborted operation, and no amount of relaunching, refreshing or restarting seems to cure the problem. What does appear to work is killing the Dock process. To do this, simply launch Activity Monitor, find the item named “Dock,” and click Quit Process. The Dock will disappear, relaunching a few moments later. And behold! No more phantom badge.

Remotely connecting to an Airport Disk in OS X Lion

After upgrading to OS X Lion and iCloud, I was disappointed to learn that remotely connecting to drives shared on an Airport Extreme is apparently no longer a supported feature. After a bit of experimentation, however, I found that—at least for now—it is possible to mount an Airport Disk directly by doing the following:

  1. In Finder, select Go > Connect to Server…
  2. Enter something like this, replacing placeholder names with the real names of your Airport Extreme, .Mac account and shared drive: afp://My Airport

Essential iTunes hacks

Whenever I have to reinstall iTunes, I also have to reapply the hacks that make it behave the way I like. Mostly for my own convenience, here is a list of the hacks I use.

To get rid of the Ping drop down menus next to artists and so forth, type this in Terminal:

defaults write hide-ping-dropdown -bool TRUE

To enable half stars in track and album ratings:

defaults write allow-half-stars -bool TRUE

To restore the little store link arrows removed when Ping was introduced:

defaults write show-store-link-arrows -bool TRUE

And to make the store link arrows filter the library rather than launch the store:

defaults write invertStoreLinks -bool TRUE

Adding an environment variable to Bash PATH in OS X

I can never remember how to add environment variables to .bash_profile. This post just reminds me how to do that.

It’s dead simple. Just open up Terminal and enter the following (changing the path ‘/opt/subversion/bin’, naturally):

echo 'export PATH=/opt/subversion/bin:$PATH' >> ~/.bash_profile

If .bash_profile doesn’t exist yet (and it doesn’t by default), it’ll be created. Otherwise, the environment variable will be added to that file.

Credit to Indy Nagpal.