How to Automatically Eject All Disks on a Mac

It’s always been a pain to manually eject disks one by one before removing a MacBook from a dock. Here’s a way to use AppleScript to automate the process in just a few minutes.

Convert “localhost” to your Mac’s current IP address

When developing web pages, I use my Mac’s built-in Apache or MAMP.app. Viewing the page means using an address such as http://localhost/mypage.html. I decided to make my life a little easier by writing an AppleScript that looks at the open tabs in Chrome and Safari then replaces “localhost” (or custom domain) with my current IP address. Saving this as a service enables me to go to Chrome > Services to run the script.

AppleScript for generating SCORM manifest nodes

Today I decided to whip up an AppleScript that automates the generation of the <file> nodes to make my life a little easier. If you’re on a Mac, you may find it useful, too.