Lion Recovery Disk Assistant
“Built right into OS X Lion, Lion Recovery lets you repair disks or reinstall OS X Lion without the need for a physical disc.
The Lion Recovery Disk Assistant lets you create Lion Recovery on an external drive that has all of the same capabilities as the built-in Lion Recovery: reinstall Lion, repair the disk using Disk Utility, restore from a Time Machine backup, or browse the web with Safari.” — via Lion Recovery Disk Assistant.
Mac Mini Vault – Apple TV Webserver.
“One of the fun projects going on at Mac Mini Vault is our Apple TV webserver. As much as we’d love to see how many Apple TV’s we could mount into a data center cabinet, it will never be a sustainable service to offer. This project was a fun way to see how far we could take the A4 powered Apple TV. The Apple TV is running iOS 4.2.2 obviously jailbroken with lighttpd for a web server. You can see the webpage we set up by visiting atv.macminivault.com. We’ll keep an eye on the CPU load and watch the analytics to record how much traffic the Apple TV receives.” — via Apple TV Webserver..
Again, some of those on twitter know me all too well. Thanks (again) to @DEVi8 for showing me this one.
Apple Baked Oatmeal
Shared by rbngndl
Ingredients
- 1 C home made applesauce with cinnamon/sugar
- 3/4 C brown sugar
- 1/2 c white sugar
- 4 eggs
- 6 C quick oats
- 4 tsp baking powder
- 1 tsp salt and cinnamon
- 1 tsp cinnmon or 1/2 cinnamon and 1/2 apple pie spice
- 2 C milk
- 2 apples peeled and chopped (I like granny smith)
- 2 C coconut
- 1 -2 C craisins or raisins
- 1/2 C chopped walnuts or pecans
Directions
- Beat together 1st four ingredients. Add remaining, mix well. Add apples, coconut, craisins last. Sprinkle nuts on top and pour into greased 9 x 13 and cover and refrigerate overnight. Remove from refrigerator while you preheat the oven. Or go ahead and bake at 350 for about 45 minutes or until center is set.
Search, share, and cook your recipes on Mac OS X with SousChef!
[tags]breakfast,apple,oatmeal,recipe[/tags]
RapidWeaver Add-ons Version Identifier
One thing RapidWeaver does poorly — at this current moment — is help the end user determine the product version they are using on any given 3rd party add-on. Knowing your add-ons (theme or plugin) version number is critical when asking for support and is often one of the first things the developer will ask you for.
If you know where the add-ons are kept (~/Library/Application Support/RapidWeaver/) then you might be able to determine a plugin or themes version number with the Finder, or if you have RapidWeaver open you can find out a plugin’s version by opening the plugin browser, or if you show a themes package contents and…
Well, I like to have these sorts of things at my fingertips and do as little thinking as possible, so I wrote an AppleScript to gather this information for me no matter where I am or what I am doing*:
-- file types to choose from
set rwTypeArray to {"Theme", "Plugin"}
-- choose from those file types
set rwTypeLong to {choose from list rwTypeArray ¬
with prompt "Which RapidWeaver product type ¬
you like to find the version of?" ¬
with title "Theme or Plugin"} as string
-- logic from result
if rwTypeLong is "Theme" then
set rwType to "rwtheme"
else
set rwType to "rwplugin"
end if
-- get name of hard drive
tell application "System Events"
set diskName to (get name of startup disk) as string
end tell
-- get name of user
set userName to (do shell script "whoami") as string
-- select file from RW directory
tell application "Finder"
set rwFile to (choose file with prompt ¬
"Please select your RapidWeaver " & rwTypeLong & ":" ¬
default location (diskName & ":Users:" & userName & ¬
":Library:Application Support:RapidWeaver" as alias) ¬
of type rwType without invisibles)
-- read version number
tell application "System Events"
set rwInfo to (get version of the file (rwFile as string))
end tell
-- and display it
if rwInfo = "" then
display dialog ¬
"It seems that your " & rwTypeLong & ¬
" doesn't have a version number that I can read. ¬
Sorry.\n\n¬
Would you like me to reveal it's ¬
package contents for you?" ¬
buttons {"Cancel", "Yes"} default button (2)
set rwPath to rwFile & "Contents" as text
open rwPath
else
display dialog "The version information:\n\n" & rwInfo & ¬
"\n\n ...has been copied to your clipboard." ¬
buttons {"OK"} default button (1)
-- copy to clipboard
set the clipboard to rwInfo
end if
end tell
Notes
* If a theme is to have it’s version number read, it must have an Info.plist in it’s package contents. Some theme developers do not include this file. For those that don’t, the script will reveal the theme’s package contents so that you can inspect the version number at the bottom of the Theme.plist file
Download
Get your fresh copy of RapidWeaver_Addons_version.scpt from CodeCollector.net
Creating Unique ID's For… Anything!
There are numerous reasons you might need a unique identifier on something; you upload files with common names to the same ftp site, you use the id attribute for internal links on a blog that might display multiple posts (the chances of repeating yourself are good), you want to sign your emails with a unique, one time id for your own verification… Whatever the case, a unique id could come in handy.
The easiest thing to do is use a timestamp and a shell script can do that easily enough for us. For everyday use, the year, month, day, hour, minutes and seconds should suffice (unless you need multiple unique id’s per second). Here is how the bash script would look:
date +%y%m%d%H%M%S
Entering this string into the Terminal.app would yield a twelve digit number like this:
091027191546
The first pair of digits is the year, the second pair is the month, the third pair is the day, then the hour, minutes and seconds (all in pairs). Run this script in Terminal.app as many times as you like and you will never get the same number.
So you could enter this into your terminal every time you wanted a unique id… or you could make this shell script work for you from anywhere.
TextMate Snippet
TextMate makes running shell scripts dead easy — all you need to do is create your own snippet. To do this:
- open your Bundle editor —
Bundles > Bundle Editor > Show Bundle Editoror⌃⌥⌘B - create a new bundle (if you don’t already have your own) from the + icon
- within that bundle create a new snippet from the + icon
in the edit window, type:
`date +%y%m%d%H%M%S`- define a Tab Trigger or Key Equivalent
- leave the scope selector blank to have the snippet apply to all language types
Now you have a snippet that is accessible in any language scope you use TextMate for. This is handy if you write reference links in HTML articles, such as:
<a href="#note_091027194043">See this note</a>
<div id="note_091027194043">
This is the special note I wanted you to see.
</div>
Or for reference style links in MarkDown:
Check out our site, [seyDoggy][a_091027194631], for some
really cool tips and tricks.
[a_091027194631]: http://www.seydoggy.com/ "seyDoggy's really cool site"
Download
Download your fresh copy of “Unique ID.tmSnippet” from seyDoggy.com.
AppleScript to clipboard
Say you’re not a TextMate user but you still want a quick way to run this shell script with as little effort as possible. AppleScript makes quick work of this task with it’s do shell script functionality. We need to make an AppleScript that runs the shell script, then copies the results to the clipboard. Then we can paste that result into what ever we’re working with at the time; file renaming, email signing, etc…
Here is how the script looks:
set uniqueID to (do shell script "date +%y%m%d%H%M%S")
set the clipboard to uniqueID
display alert "\"" & uniqueID & "\"" & "Has been copied to your ¬
clipboard" giving up after 1
Download
Get your fresh copy of “UniqueID.scpt” from CodeCollector.net
[tags]applescript,shell,script,textmate,snippet,terminal,unique id[/tags]
Enabling Double Arrows in the Scroll Bar
Ohh, ohh, ohh, I can’t forget this one! This is one of those options you forgot you enabled with a utility like Onyx. So when you go and do your clean install of OS X and realize that some things are just not the same as they were, it’s the the little things like having double arrows at the top and bottom (or left and right) of a scroll bar that you miss.
Having vowed to take matters into my own hands with this install and being acutely aware of every system hack I make, I am documenting everything I do (on this blog) and I am making sure it’s something I can control via the terminal. So, instead of using Onyx, here is the terminal hack for enabling double arrows in your scroll bars:
defaults write "Apple Global Domain" AppleScrollBarVariant DoubleBoth
If you ever need to go back you just open the System Preferences (/Applications/System Preferences.app), click on appearance and choose one of the two defaults from “Place scroll arrows:”; “Together” or “At top and bottom”.
Auto mount/unmount your Mac volumes when required
Earlier this month you might recall the solution I gave you for keeping unused volumes unmounted on your mac. The next part of the equation, automatically mounting those volumes when needed to run my backup scheme, took me a little longer to sort out. In fact I wasn’t able to write a solution on my own, try as I might, so I finally went searching for one.
I needed a script of some sort that would mount my unmounted volumes when it was time for ChronoSync to run and then unmount my volumes when ChronoSync was finished. After several IRC queries, forum posts here and there and countless Google searches I finally stumbled upon this post at Mac OS X Hints. This solution was the answer I needed and it works perfectly. I won’t recap the whole thing here, but I will give you the bits that were most important to me.
Copy the following script into Script Editor.app (/Applications/AppleScript/Script Editor.app), changing the diskname and appname to suite your needs:
property diskname : "MyDisk"
property appname : "ChronoSync"
on idle
tell application "System Events"
set x to the name of every process
if appname is not in x then
if (exists the disk diskname) then
do shell script "disktool -l | egrep -i "Mountpoint = '/Volumes/" & diskname & "" | cut -d\' -f2 | xargs -n1 disktool -p"
end if
else
do shell script "disktool -l | egrep -i "Mountpoint = '', fsType = 'hfs', volName = '" & diskname & "" | cut -d\' -f2 | xargs -n1 disktool -m"
end if
end tell
end idle
Next you need to save it as a bundled app and select “Stay Open“, give it a useful name and save it where you will be able to find it. In my case I chose /Library/Scripts/ChronoSync/:

Then you have to make it run in the background. To do this, find your newly created app, right click on it, “Show Package Contents“, find the Info.plist and open that in your favorite plain text editor. Above the key that says CFBundleAllowMixedLocalizations you want to add the following:
<key>LSBackgroundOnly</key>
<string>1</string>
Get out of the package and find your app again and double click on it. It should launch in the background but not show in the dock. You can see that it’s running by opening Activity Monitor.app (/Applications/Utilities/Activity Monitor.app):

Now to truly make this process automated, you need this app to be on when your computer is on, so it needs to launch when you login. So open your Accounts preference pane in System Preferences.app (/Applications/System Preferences.app), select the Login Items tab, select the
button and add your newly created app:

And that’s it! Next time your backup program fires up to do it’s regularly scheduled backups, your disk mounting app will mount your volume, wait for your backup app to finish and then quietly tuck your volume back up for the night.
Other references
AppTrap; the unistaller that makes sense
One thing that’s become increasingly important to me over the years is uninstallers. If an app doesn’t come with one I am reluctant to install it. It became painfully clear recently just how much crap application leave behind when you are done with them and banish them to the trash.
In the last few years a number of apps have cropped up that not only remove the app, but all of it’s associated plist files and folders and what ever peripherals the app has added to your system. I have been using AppZapper for no better reason than in was there, packaged with some Delicious Generation bundle of the time (probably Macheist), but it always struck me as odd that I would have to open an app to move another app to the trash. I presume it’s just to show off their artwork and screen flashy effect more than any practical reason. But to me it just seems like one step too many.
In my hunt for something smarter, I came across AppTrap. This just makes sense to me. It sits in waiting, in your preference pain and if you happen to drop an app in the trash, it pops up and asks if you to get rid of the other crud that goes with it. How smart is that?
I Give Apples New Safari 4 Beta a Spin
Apple announced today the launch of their Safari 4 beta program that claims to lead the way with innovation. I had to test this claim so I immediately downloaded it and gave it a spin. Here are my findings:
- On initial launch you are presented with the “Top Sites” window in which it appears that Safari scours your history for the most frequently visited sites in your recent cache and then throws up their thumbnails in a Core Animation like black gallery for you to pick from. Selecting the edit button allows you to remove items and make others sticky. I presume you can also add others that might actually be more indicative of your “Top Sites”. Again, in true Apple form, Apple seems to be hinging the success of a product on visual wow factor, but admittedly I could see myself making use of this.
- My next reaction was when I created a new tab and found that, a la Google Chrome, the tabs are on top. Why? While I will most certainly get used to it, what is the actual reason for this? I can’t find and difference in their functionality apart from the fact that you can only drag them about from their corner. Aside from that you can still drag them, move them from window to window, create a new window with each tab… there is one option I hadn’t noticed in previous version, “Add bookmark for these X tabs”. Is that new?
- Coverflow in Safari… there have been a few plugins to address this in the past. I guess they are history now. Do I need Cover Flow in Safari? I don’t need it iTunes or Finder so I probably won’t use it here either. But that said, it must be a popular enough technology if they keep throwing it in to their software.
- History search. Now that I like! I have always found searching the the history in the bookmarks folder to be painful and unproductive. This history search is insanely fast and (in Cover Flow form) even shows you screen shots of the sites that match your search terms.
- It claims to be faster, using the Nitro Engine. It could be but browsers and web technology today is getting so fast I would be hard pressed to notice the difference. It does seem to be faster overall but am I reacting to the guts of a finely tuned OS X Cocoa application or the page load? One note I will make about making browsers faster (and Safari 3 is already guilty of this), they cache things… unnaturally so which can make web development a nightmare. Safari 3 already caches it’s javascript and images in ways that cause web developers to have to reset their browsers all too often just to get an accurate response on their new projects. And faster also means pre-load, again which Safari 3 is bad for. Safari 3 will scour your main CSS file in search of things to load (like background images), whether or not that thing is actually needed or even being used. I hope Safari 4 handles this a little better.
- The newish developer tools are nice (if your weren’t already playing with them in webkit), but I don’t know… it’s still not FireBug. You still can’t select code in the element window! How good is debuggin if I can’t edit what’s there or even copy and past it to a text editor? Seriously? As far as developer tools, these will give a glimpse into how your page is working, but they’re not much good for anything else.
- The full page zoom could be useful (hopefully not for a few years for me yet), but wow does it ever slow things down. Zoom in once and try page scrolling… not so fast now.
- I love, love, love the new address bar! If I am going to interface with browser in any way, it’s through the address bar so this improvement is quite welcome. Basically when you start typing in the address bar you are presented with much the same information your were before, but it’s clearly defined in two categories; history and bookmarks. In both cases it presents you with the site title followed by the URL which makes it very easy to get your bearings.
- The search field is now really slick too. It’s along the lines of Inquisitor, offering you suggestions and previous search queries. Very nice!
- CSS Animation, CSS Effects, CSS 3 Web Fonts… just more things to tease us web developers with. Stuff we won’t be able to use in the real world until all other browsers catch up. We can always dream though…
Overall, I think this is two things combined; a promising look at where web browsers should be and a sobering reminder of how much waiting for other browsers to get there will suck.
Keeping unused hard disks unmounted
The question
How do you prevent Mac OS X Leopard from auto mounting disks, drives and volumes when the computer boots up or a user logs in? (skip to the solution)
The preamble
I have spent days (literally) searching for the answer to this one; I have a Mac Pro running Leopard with (count them) 4 internal hard drives. One is my system disk and the other 3 are backup disks. Two are weekly mirrors of my system while the third is a daily snap shot of my user account. We won’t even get into the external disks I have. Yes I am THAT anal about my data.
So what is the trouble here? When you have this many disks containing duplicate data, Spotlight, QuickSilver, Launchbar, Google QSB, etc… they all want to serve up information found on each disk. That would include duplicate information that you most likely don’t want to inadvertently open and/or edit. But further to this, why spin up a disk, potential shortening it’s life span and wasting precious energy, when it only gets used on occasion?
One way around this is to diligently eject each volume every time you boot up your system. But that is both a pain in the butt and no where near as geeky as it should be. So do a quick search on Google for a solution to “unmount disk on login” or “prevent volumes from mounting at the boot up in Mac OS X Leopard” and you get a great deal of outdated info, inefficient Apple Scripts, overly complex bash commands, apps that wrap bash in an executable app that you launch at login when the moon is at… you get the idea.
So I set forth to put together the best of the best and simplest of the simple and post it here, for my own reference, exactly what I did to prevent my back up volumes from mounting on boot up.
My Solution (proceed at your own risk)
First off, what you are going to find with most solutions out there is the need for a file called fstab in the systems hidden “/etc” folder. The trouble is that later versions of OS X (10.4.x and later) don’t have this file. However, there IS a redundant file called fstab.hd. WE ARE NOT USING THIS FILE. Instead we will create our own fstab file. So with that out of the way, let’s get started:
The short of it
- Start by making a backup of your system. If you bugger up your system you’ll have something to recover from.
- Open terminal (/Applications/Utilities/Terminal.app)
- Do one on the following:
- In Terminal, type the following (with your volume name) and return
*:diskutil info /volumes/DiskName
- Or, you can use Apples Disk Utility app (/Applications/Utilities/Disk Utility.app), select the disk in question and choose “info” from the toolbar.

- In Terminal, type the following (with your volume name) and return
- Find the Volume UUID (Universal Unique Identifier). Copy the UUID to your clipboard
**. - In Terminal enter and return
***:sudo pico /etc/fstab - Enter your password and return.
- You’ll enter a window that looks like this:

- Enter the following (with your UUID) and return
****:UUID=87635CC4-B2EF-3114-B854-F64347A39630 none hfs rw,noauto 0 0 - Repeat step for each device you with to hide, each on a new line.

- Exit pico (⌃X) and save (Y).
- Press return when prompted with:
File Name to Write: /etc/fstab
- All that’s left to do is is cross your fingers and reboot your Mac.
The long of it
*substitute “DiskName” for the name of the volume you wish to hide. If your volume name contains a space, like “Macintosh HD” you need to escape the space with a backslash so it looks like “Macintosh\ HD”**We use the “Volume UUID” as the disk identifier since it is not prone to change like “Device Identifier” (i.e. “disk0s2″) which can change with each and every start up.***This will create/edit your “/etc/fstab” file with pico, a simple text editor.****The string you are entering is the device id followed by the mount point, the filesystem, the mount options, the dump and fsck booleans. In this case:- the device is my UUID (UUID=87635CC4-B2EF-3114-B854-F64347A39630)
- the mount point is “none” (because we won’t be mounting it)
- the file system is “hfs” (since it’s formatted for Mac)
- the mount options are “rw” (read-write) and “noauto” (volume will not auto mount)
- the dump option (backup utility) and fsck option (filesystem check utility) booleans are both set to 0 (false, off, nil, nada) since we don’t plan to mount the volume and therefor don’t need to backup or check them
For more on fstab column structures, visit tuxfiles fstab help.
The wrap-up
For whatever reason, Apple decided to nix fstab from it’s own Unix core. Perhaps for security or perhaps they just deemed it unnecessary. If you look in the other file I mentioned, “/etc/fstab.hd” (in terminal, enter and return: sudo pico /etc/fstab.hd), you’ll see the message:
IGNORE THIS FILE. This file does nothing, contains no useful data, and might go away in future releases. Do not depend on this file or its contents.
However, I see no harm in extending the life expectancy of my disks and saving energy at the same time. All while doing away with the annoyance of long indexing times and being inundated with duplicate search results. If you have anything to add, please feel free to leave a comment.
