Archive

Monthly Archives: December 2010

I had been hemming and hawing over whether or not to upgrade the MacBook Air I got only last year. I am definitely not one of those who must have the latest and greatest, and quite frankly I thought the new MBA wasn’t enough of a leap forward—what about integrated 3G, what happened to the keyboard backlighting, what about a faster processor? But recently I found a few good reasons which necessitated getting an upgrade: I need more RAM, 2 USB ports would be very nice, any speed bump would be welcome, and most importantly I’m running out of space on the little 128 GB SSD. So, last week I found myself in an Apple store with credit card in hand.

Then came the usual question: so how long is it going to take me to get back up and running? I feared having to reinstall everything. Re-license software, move settings, etc. etc. Well, Apple has this nifty thing called Migration Assistant which really helps you get onto the new computer provided your existing one was a recent Mac too. Mind you, I use Time Machine to regularly back up my computer, so that accounted for the rapid turnaround. How fast? Well this was my schedule last Thursday:

  • 5:25 PM: Called up a local Apple store to see if they had the “MacBook Air Ultimate” version in. The guy said yes.
  • 5:45 PM: Showed up at the store, picked up computer.
  • 6:10 PM: Returned home, left computer inside. Got in friend’s car. Went to dinner and a show.
  • 12:05 AM: Returned home from events, plugged in old MacBook Air, ran Time Machine backup.
  • 12:10 AM: Unboxed new MacBook Air, hooked it up to power, chose option to migrate from an existing Time Machine backup. Walked away. Read a book. Made a snack.
  • 2:00 AM: New MBA was completely installed with all of my old settings. Jaw hits floor.
  • 2:10 AM: Launched all apps I could think of. Everything was in place. Icons on desktop were also in place. Synced iPhone and iPad and everything was fine. I didn’t even have to reenter my network settings.
  • 2:20 AM: Started testing out Rails programming environment. Apache not working. Picked jaw up off of floor. Did quick investigation. Moved two files over from the old MBA. Apache working again.
  • 2:25 AM: Checked everything else out. I’m back up and running w/ pretty much zero downtime on the new computer. Jaw hits floor again.

I was absolutely amazed at how well Migration Assistant worked. Almost everything made it over, including stuff that power users would have set up like /usr/local/lib. Of the very few things that broke, I’ve been keeping a running list over the past 5 days and I think this may be all of the issues:

  • /etc/hosts: From the looks of it, M.A. tried its best to move it over but it ultimately botched this one up. I found some residue (hostconfig~orig and hosts-orig files) but the actual hosts file needed to be copied manually.
  • /etc/apache2 directory: Pretty much all of the apache2 directory also needed to be manually copied over. Found some file residue also there: httpd.conf~orig and httpd.conf-orig.
  • MySQL socket needed relinking: If you get the old error:

    Can’t connect to local MySQL server through socket ‘/opt/local/var/run/mysql5/mysqld.sock’

    You’ll need to: sudo ln -s /opt/local/var/run/mysql5/mysqld.sock /tmp/mysql.sock

    Thanks, Paul Sturgess.

  • Mac OS Developer Tools: *I* apparently forgot to back up the /Developer directory on my Time Machine backup, but I’m assuming if you did this you wouldn’t have to get the latest Xcode from http://developer.apple.com/devcenter/ios/index.action. But after installing this again gcc was back to working order.
  • MySQL users needed recreating: I’m not quite sure if this just my bad but my MySQL users table got messed up. Not all of them, only some. The database catalogs were OK, but the user accounts needed recreating and reassignment of privileges.
  • Microsoft Office 2011: It needed reauthentication, probably some anti-piracy thing detecting a change in the hardware signature. Good thing I saved the product key info when I downloaded the software only a few weeks ago. NOTE: Microsoft did *not* email the product key info when I registered. I’m glad I had done a print-screen at the time.

Overall, I think that’s a very respectable short list of adjustments. By Friday morning I was back coding using all the normal applications and nothing seemed to be amiss.

And now for a quick MacBook Air 2010 review:

  • I really do miss the keyboard backlighting.
  • … but stereo speakers and 2 USB ports is a good tradeoff.
  • Volume controls are 1 button to the left of where they used to be and that’s annoying but I’ll get used to it.
  • The higher screen resolution *does* make some web pages and apps harder to read but not by that much. It is nice having 1440×900 back again. NOTE: This is probably *not* the best computer for the visually-impaired.
  • I seem to have a little lag on the trackpad. I haven’t had the uni-pad trackpad+button before and maybe it’s just an issue of the driver trying to figure out if you’re mousing+clicking versus two-finger-gesturing, so it needs a half second to respond.
  • The keyboard is a little more “clicky”, offering slightly more resistance and whole lot more clicking noise. The old MBA late-2008 had a smoother feel.
  • The subtle screen dimming/undimming effect when the computer has been idle for a while is a nice touch. Less jarring than the “pop” of brightness.
  • I’m not really feeling the speediness of the new faster SSD and 2.13 GHz, but then again the old MBA was pretty fast so maybe it’s just a fraction faster. I did launch Parallels and the VM was resumed almost instantaneously, but that might be more due to the 4GB of RAM than the old 2GB.

Older MBA posts here: 2009.04.15, 2009.03.06, 2009.02.25.

I have an older MacBook Air that I want to get back to its factory-fresh state. The trouble is that the Air doesn’t have a DVD drive and the older Airs came with a couple of DVDs. So, Remote Installing to the rescue. See the exact instructions on this older blog post: http://blog.seqmedia.com/?p=103

After the long setup, wouldn’t it also be nice if you installed all the iLife software that came with the Mac too? Well, you can! You’ll need to:

  1. Create a test user with a short test password. (You MUST create a password.)
  2. Skip through the registration process just to get by the prompts.
  3. When you’re back at your desktop, use the Remote Disc to get back to your other computer and pop in the Applications Install DVD. Install all the apps.
  4. Now to erase that test account and bring back the fun startup video, thanks to MacWorld:
    1. Restart the computer.
    2. Hold down Command+S during boot to enter single-user mode.
    3. Set the mounted root disk back into write mode: mount -uw /

      Note: You might note that the instructions printed on the screen say you should fsck. You probably should. I haven’t and it has still worked fine.

    4. Remove the system configuration (leaving the iLife apps plist files alone): rm -rf /Library/Preferences/SystemConfiguration
    5. Remove your test user account: rm -rf /Users/TESTUSER
    6. Remove the usernames plist: rm /var/db/dslocal/nodes/Default/users/TESTUSER.plist
    7. Remove the setup info plist: rm /var/db/.AppleSetupDone
    8. Restart the system with a command: reboot

(If you don’t want to bother installing the iApps you can just Command+Q at the welcome screen. See Hivelogic’s article.)

So, I’m still back in the “Dark Ages” of Rails 2.3 on some projects. Still, I find Devise works really well so far. The trouble is that every time I have to look up the documentation, I always have to go through the same hunting process. So, here’s a condensed guide to getting started with Devise 1.0.

  • Follow the installation instructions on
    https://github.com/plataformatec/devise/tree/v1.0

    • gem install warden
    • gem install devise --version=1.0.9
    • Add the gems to your environment.rb (or Bundler):
      config.gem 'warden'
      config.gem 'devise'
    • ruby script/generate devise_install
    • To each of your environment files add:
      config.action_mailer.default_url_options = { :host => 'localhost:3000' }

      Note: The host does not have an http:// on it!

    • Add a template partial or edit the application.html.erb to include the global flash hash messages:

      <p class="notice"><%= flash[:notice] %></p>
      <p class="alert"><%= flash[:alert] %></p>

  • Install a model w/ Devise enabled on it:
    ruby script/generate devise User
  • Augment the new app/models/user.rb with whatever modules you need.
  • Generate the Devise views:
    ruby script/generate devise_views

That is really just about it.

Taken from http://pitupepito.homelinux.org/?p=24 because apparently I’m using this all of the time.

Quick instructions to remove a Git submodule

  1. Remove the submodule entry in .gitmodules
  2. Remove the submodule entry in .git/config
  3. Important: Run this command instead of just deleting the directory:
    git rm --cached path/to/submodule
  4. Warning: Be careful when running this command next:
    rm -rf path/to/submodule

As Jose notes, the git rm step should not have a trailing slash in the path.