Category Archives: Uncategorized

Snow Leopard Marketing Polish

Apple isn't any better than Microsoft in the "Photoshop things for marketing" area1. Below is the image Apple used for the retail box of Snow Leopard (hover for original version):

Hat tip: Neven Mrgan

Parallels, Windows 7, Boot Camp and Me.

I downloaded the Windows 7 Release Candidate almost as soon as it was available (if you haven't yet, try it out). I wanted needed it for Left 4 Dead compatibility testing the various web related projects that I work on. It ships with Internet Explorer 8 which has an IE7 rendering mode1 (and you might know already I'm not testing IE6 anymore), so it does what I need (and plays Left 4 Dead, probably better than I do).

I had to partition my MacBook Pro's hard drive to use Boot Camp, but lost everything on the drive. I figured that would happen because every attempt to partition my drive (yes, even after defragging it, using iDefrag) would fail, though without any data loss... until I tried booting off my Leopard Install DVD and used Disk Utility. I wasn't worried as I had, minutes before, just had Apple's Time Machine back everything up.

However, with Boot Camp if I wanted to run Windows, I'd have to restart my machine2. On top of that, what if the web site or app that I'm testing lives on my Mac? Enter: Parallels.

Parallels 4 can indeed boot a virtual machine off your Boot Camp partition. That is, however, it can, but not without some cajoling. I tried setting up a virtual machine using the Windows 7 (experimental) settings, but was hit with this error:

Failed to configure the Boot Camp partition's hard disk.

A disk configuration error has occurred. Make sure that you have read/write permissions for the disk.

I thought perhaps it couldn't read/write NTFS partitions, but then I realized how silly that would be. So I tried, counter intuitively, to go through the setup as if my Boot Camp partition were a different OS — in my case, Windows Vista (I figured it was close enough). Success! (or in the interwebs vernacular: WIN!)

Parallels proceeded to set up the machine, which warned me several times that the OS was not officially supported and that I would need to reactivate my OS and Office registration. I'm not worried about Office, since I don't have that, but we'll see what happens with Windows 7. I just got a pop up saying it detected a change in hardware and I should reactivate in the next 2 days if I want to keep using all of Windows 7's features. I went to check the notices, but the note to reactivate wasn't there.

Behold, Windows 7 and Mac OS X, running side by side (I have Windows 7 full screen in my a secondary display):

Windows 7 and OS X, thanks to Parallels

Sadly, Aero does not work in Parallels, but other than that, I don't seem to be missing much else. Of course, I wouldn't use this virtual machine for gaming, but it runs Internet Explorer 8, and can browse my local machine's development server and it seems to me that Windows 7 runs much better than any of my previous virtual machines. It could be that this time it has a dedicated partition... or it could be that Windows 7 is handles much better with less resources than XP, either way, I'm pleasantly surprised.

I'm using one of the wallpapers in this Aurora Borealis Wallpaper Pack and here's my Aerora.themepack, if you were so inclined.

  1. The IE7 mode still uses IE8's javascript engine, so there is no guarantee you are free of any IE7 related issues. 

  2. When Leopard was announced, one of the features of Bootcamp was the ability to hibernate OS X and switch to Windows and within hours of that announcement, that feature was removed from the feature list, and we haven't heard anything new about the matter. 

SVN with a bit of ADD

I tired of manually adding all the new files in my working copy of various projects in subversion so I started using this command:

svn add svn status | grep ? | awk '{print $2}'

... but I eventually grew tired of looking that up every time. I tried to make that into an alias, but because of the shell escaping it didn't work as is. I did a bit of digging around and found a non-shell escaped version then added these lines to the bottom of my ~/.profile (I'm sure it would also work in ~/.bash_profile):

alias svnadderall="svn status | grep '^?' | cut -b 8- | xargs svn add" alias svnridallin="svn status | grep '^!' | cut -b 8- | xargs svn remove --keep-local"

A quick breakdown of how this works:

  • alias svnadderall =
    this is the command that tells bash what will happen when you type svnadderall. You can change that to whatever you'd be more comfortable with. I used "adderall" and "ridallin" because I'm clever like that (I'll eventually get sick of the puns, but the ADHD mnemonic will help me get in the habit of using them (yes, I know they're not spelled correctly; they're phonetic mnemonics)).
  • svn status |
    prints out the status of all your files and passes it to
  • grep '^?' |
    finds each line beginning with ? and passes it along to
  • cut -b 8- |
    trims off the first eight characters and returns the rest of the lines and passes it to
  • xargs svn add
    captures everything and runs svn add [whatever it was passed]

It's the same for the svn remove except the grep is matching for lines that begin with ! and I'm using a --keep-local flag to prevent svn from trying to remove the file1 (which won't exist, since it's missing, remember?).

I tried changing the cut -b 8- to sed 's/^?[ ]+//' and even awk {print $2} but neither worked properly for some reason; the awk based version tried to svn add ? and the sed version sat there waiting for input.

On further consideration, I think cut -b 8- will be the safest. The file name won't always be the second item in the svn status output. I can't imagine any situation where that would be the case for non-versioned files, though there might be true for missing versioned files would have a secondary (or tertiary) flag.

If you're editing your bash_profile or profile be sure to run source ~/.profile (or source ~/.bash_profile) if you want your shell to pick up your changes. You can also logout and log back in (or open a new Terminal.app tab or window) as well.

  1. I don't know if it's an subversion v1.6 thing or not, but doing an svn remove on files that do not exist on the file system would exit on the first error, in this case being that the file doesn't exist. 

Copyright © 2004 - 2010 M. Auayan. All rights reserved.