Thursday, May 14, 2009

Spotlight does Math

I just discovered that Leopard's Spotlight does math. Try it. Bring up spotlight with ⌘+space. Then start typing something like
7pi*8.3 or
sqrt(2)
and the answer is the first search result.

This isn't quite a powerful as the Google calculator. It doesn't appear to do base conversion, and it doesn't let you copy the result for pasting into an application, but it seems handy nonetheless.

Wednesday, May 06, 2009

Mac OS X handy bash aliases

Here are a few handy aliases that I keep in my .bashrc in OS X:
alias cppwd='eval "echo `pwd` | tr -d \\\\n | pbcopy"'
This copies my current working directory to the OS X pasteboard so I can Cmd+V it into another terminal. Often I want several terminals open in the same directory at once.
alias burn='drutil burn -noverify'
This one lets me type
burn mydisc.iso
to burn an ISO disc image to CD or DVD without having to open Disk Utility.
And a variation:
alias vburn='drutil burn'
This does the same as the other but also does the disc verification step.