Archive of published articles on May, 2009

Back home

OSX AppleScript command line util to eject all removable disks

2009/05/26

On my MacBook pro, I’ve got 4 removable hard drives (2 physical in 2 partitions each) and a JungleDisk mount.

I found it painful to manually eject each individual drive in the finder so I threw together this quick AppleScript to eject all the disks.

tell application "Finder"
	eject (every disk)
end tell

Just open up /Applications/AppleScript/ScriptEditor.app and paste that in. Then choose “Save As” and pick “Application”. That will compile the script and create a .app file that you can click on to run, or you can put it in your path and execute it there.

I think the same kind of script could be created with the command line “diskutil eject” command, but this seemed cleaner as I wasn’t able to come up with a generic way to figure out which disks were “ejectable” and which weren’t. AppleScript is able to figure that all out for you.

4 Comments

Shared zshrc file

2009/05/13

Over the years, I’ve had a number of requests for me to share my zshrc file with friends and coworkers. In the past, I’ve normally trimmed out the sensitive parts by hand and then e-mailed the most useful stuff. I’ve always intended to make this an easier process and I’ve finally gotten around to it.

I’ve created a new bitbucket repository to hold my shared zshrc configuration. You can get it for yourself by cloning the repository:

cd ~
hg clone http://bitbucket.org/tednaleid/shared-zshrc/

Read the rest of this article »

3 Comments