Steve Levine

Archive for the ‘Mac’ tag

Time Machine over a Network Drive

without comments

This post describes the steps involved when setting up Time Machine to backup to a Network Drive. These steps are only required if you want to back up to a device other than a Time Capsule. It is pretty quick and easy, so without further due, lets get started.

Step 1: Enable network backups in Time Machine

In a terminal window cut/paste the following command:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Step 2: Create Timemachine backup volume

In a terminal window cut/paste the following command:

hdiutil create -fs HFS+J -volname "Backup of computer-name" computer-name_[mac address without':'].sparsebundle

The simplest way to obtain your mac address is to open a terminal window and type the command: ifconfig -a, and look for the section of the output where it says: ether 00:33:44:55:66:77

The simplest way to obtain your computer name is to open a terminal window and type the command: hostname, it will return the name of your computer, example, my-hostname.

Putting it all together, based on the above examples, you would run the following command:

hdiutil create -fs HFS+J -volname "Backup of my-hostname" my-hostname_003344556677.sparsebundle


Step 3: Copy file created in step 2 to network Time Machine backup destination

Using finder or terminal, copy the newly created .sparsebundle file to the place you want your Time Machine backup to reside.

Step 4: Open Timemachine preferences, and the network drive should show up as a backup target

If for some reason it doesn’t, try opening and closing the Time Machine preferences, as it may take a moment for it to detect the newly available network drive.

Step 5: Rest easy knowing your mac is now backed up to a network storage volume.

This entry was posted by Steve on Sunday, December 13th, 2009 at 2:04 pm and is filed under: , , . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Simple Applescript For The Traveling Mac

without comments

The Problem

You have a MacBook and a nice Apple Cinema display (this doesn’t sound like a problem so far), and you travel with the MacBook every day.  When you open the lid of your MacBook you like to have the Dock on the left side of the screen giving you the most top to bottom space, but when you come home and connect the MacBook to your Cinema display and set up dual monitors, you want the dock on the bottom of the Cinema, not on the left side of the MacBook.

You don’t want to have to go in to preferences every time to switch the location. (or maybe you do?)  For me it was becoming a very tedious task, so I began researching ways to automate it.

The Solution

Leverage Apple’s “Language of Automation”, Applescript to handle the task.  Applescript has lots of useful hooks in to OS X.

The requirements for the script are quite simple:

  • Obtain the current resolution of the primary monitor
  • if the resolution is > 1900 (Cinema Display) configure the Dock for large display
  • else configure the Dock for laptop display

For the moment, that is my goal, simple, yet time saving.

Step 1: Open AppleScript Editor

Step 2: Paste the following code in

Step 3: Run it to make sure it works as expected, if so, save the script as application, so you don’t need to open AppleScript Editor each time you want to run it.



Future requirements

  • Figure out how to hook the script in to sleep/wake events in Snow Leopard.
  • Customize more than just the Dock.
  • Migrate it in to a startup script that brings up all necessary applications based upon current mood (reading/blogging/coding).
  • Others???

Overall, I find Applescript a very easy way to automate things in Snow Leopard.

All of the source for this post can be found on github.com.  Please feel free to fork and improve.

Enjoy.

This entry was posted by Steve on Thursday, November 12th, 2009 at 10:46 pm and is filed under: , , . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

iPhone 3.0 upgrade from beta 5 to final

with one comment

For the past few months, I have been running the iPhone OS 3.0 betas on my iPhone without too many issues.  Thus I assumed that when the final version of OS 3 was released, it would be easy to upgrade to it. This has not been the case.  The current beta on my iPhone was beta 5, and then yesterday when the final version was announced, I assumed after a simple plug in to iTunes, I would be upgraded to the released version.  Nope, iTunes kept telling me that I have the latest version of iPhone OS 3.  It seems as though it is not checking the build number, only the OS level.  The next thing I tried was doing a restore, this didn’t work either because it gave me an error saying it could not connect to the site to download the file.

Finally, after some Googling around, I found that others with the same problem circumvented it by putting their iPhone in recovery mode and then upgrading from there.

If you are currently running beta 5, you were supposed to upgrade to the GM version posted last week.  I skipped it thinking their would be another release in the next few days with the final version.  I have now learned that the GM version is the same as the final version.  Unfortunately, now it is too late to download the GM from the developer website, as Apple has taken it down, and according to their documentation, you should obtain the final version through iTunes.  Thus if you are in the same boat as me, on beta 5, you will have to install the latest version via recovery mode.

This entry was posted by Steve on Thursday, June 18th, 2009 at 12:40 pm and is filed under: , , . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Quicksilver is a timesaver

without comments

It has been a while since a single program changed my workflow as much as Quicksilver has.

Over the years, it has been covered a lot on the Mac sites, but it never really seemed like something that would help me. Guess it was the stubborn side of me refusing to try something new. So the question is what changed my mind now? Two things:

  • The Productive Programer – In his book Neil Ford describes several work flows involving Quicksilver that actually made sense to me, especially the Subversion plugin.
  • Pragmatic Thinking And Learning – Again, the virtues of Quicksilver described in such a way, that made a lot of sense to me.

After reading these two excellent books, it was time for me to give it a try, and see what it has to offer. It has been about a week now, and it is hard to imagine using my Mac without it. It has increased the efficiency of my workflow tremendously. The mouse has become optional for most tasks. It has sped up common tasks for me such as checking in/out files from Subversion, opening documents to edit, quickly composing emails and attaching files, and my favorite time saver is this neat trick that allows you to lock your computer with a simple keystroke. Previously, it required clicking on the “lock screen” option in keychain.

If you are a Mac developer like me, and you are in to efficiency, you need to at least give Quicksilver a try. You won’t be disappointed.

This entry was posted by Steve on Monday, January 26th, 2009 at 2:57 pm and is filed under: , . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Fork me on GitHub Fork me on GitHub