After having bought a new Sony DSC-HX5V digital camera, which is equipped with an integrated GPS, I discovered that it comes with windows-only software for downloading and updating the GPS almanac on the camera (the supplied PMB Portable software runs on Apple OS X, but it does not support downloading the GPS almanac).
After tinkering a bit with tcpdump(1) and friends I found out how to perform the download and update manually:
- Download assistme.dat
- Download assistme.md5
- Verify that the MD5 sum of the
assistme.dat file matches the one in the assistme.md5 file
- Create a top-level folder hierarchy on the memory card for the camera (not the internal memory of the camera) called
Private/SONY/GPS/
- Place the downloaded
assistme.dat file in the Private/SONY/GPS/ folder
- Place the memory card in the camera and verify that the GPS Assist Data is valid
I have written a small perl script for automating the above tasks. The script takes the mount point of the memory card as argument.
A lot of water has passed beneath the bridge since I wrote my last entry about Apples Terminal.app vs. iTerm. Apple has released Snow Leopard with, among other things, a much improved version of Terminal.app, which has gotten me to ditch iTerm again.
So, I bring to you a version of the script for opening a new terminal window on the currently active desktop space – the Terminal.app way:
tell application "System Events"
set TerminalCount to (count (every process whose name is "Terminal"))
end tell
if (TerminalCount is not 0) then
tell application "Terminal"
do script
activate
end tell
else
tell application "Terminal"
activate
end tell
end if
As usual: Save the script to a .scpt file, open it with Script Editor, save as an Application and place a shortcut in your Dock.
Having used Apple’s own Terminal.app for all my terminal emulator needs since I switched to OS X on my primary workstation, I decided to take iTerm for a spin this weekend – it was a pleasant surprise.
Compared to Terminal.app, iTerm seems to suck up a few more system resources, but this is – imho – easily made up for with the added features. Especially tab support is much better in iTerm than in Terminal.app. Being able to set the title of tabs from the running shell (using the XTerm “icon name” escape sequence) along with the tab activity indicators rocks. Copy-on-selection and Cmd-click to launch URLs are also nice additions, that – once you get used to them – are very hard to work without.
There is, however, one missing feature of both Terminal.app and iTerm: The ability to click an icon in the Dock and have a new terminal emulator window open in the currently selected space. I’ve written a small AppleScript to do just that for iTerm:
tell application "System Events"
set iTermCount to (count (every process whose name is "iTerm"))
end tell
if (iTermCount is not 0) then
tell application "iTerm"
set newterm to (make new terminal)
tell newterm
launch session "Default"
activate
end tell
end tell
else
tell application "iTerm"
activate
end tell
end if
Save the script to a .scpt file, open it with Script Editor, save as an Application and place a shortcut in your Dock.