MacBook Repair

During Euruko 2008 the top case of my MacBook broke a little bit. At the right hand side of the front a ‘splint’ of the case came (partially) off. This was not a big issue since it was easily fixed with some sellotape. Strangely enough other MacBooks had the same piece of tape at nearly the same place.

And the day before yesterday it happened again (this time at the edge of the right side), giving me a good reason to go to the recently opened Apple Store in Munich. The first impression: Nice people there – friendly, helpful and tech-savvy.

The first good news: They would repair it free of charge even though the MacBook was out of warranty. The second good news was that I got it back today already. That was a quick and complete repair since the entire top case was replaced, including the keyboard & mouse pad.

I wasn’t too happy when the case broke, but the service in the store was really very very good.


Textmate Project Widget

To stay organised with all that stuff I write with TextMate, I use a few Textmate projects — for some general stuff, all kinds of smaller and larger Ruby code and, of course some Ruby on Rails.

And to stay organised with these project files which are spread the same way as the project directories are — I use the TextMateProject widget which is available form Mac OS X Nusings. This was created and improved by Eric and Anthony.

While most of these project files in fact live somewhere inside my home directory and are searched for and found by the widget, others are located on my iDisk and are not found (and consequently as software is they aren’t listed either). As the widget doesn’t even search on that iDisk, that’s not so too surprising.

Please note: The following involves editing files in the Library folder in your home directory which might break something on your computer. So as with all software and code lines made available like this: I make no warranties, express or implied, including without limitation the implied warranties of non-infringement, merchantability and fitness for a particular purpose in any way.

In other words: As you’re reading this, I suppose you are a software professional of some kind and you know what you do to your comuter. You act responsibly — and backup your computer regularly anyway, but certainly before you apply anything coming from the net. But in case you’re not familiar with writing or changing code, this is probably not for you.

But now, without further ado, I went into my 1st bit of JavaScript programming, to add listing of the project files on the iDisk to the projects widget. So if you’d like to do the same — here is what I did:

Download and install the TextMate Projects widget from the location given above. Now the widget should be located in this directory: /Users//Library/Widgets/TextMate Projects.wdgt. With a CTRL click your can open the contextual menu and then select “Show Package Contents”. In that directory there is a directory Scripts and inside that you should find Scroller.js. That’s what I edited:

Open that file in you favourite editor TextMate and got to ~ line 115. The 1st line is there already — I added the 2nd one:

projects = (widget.system('mdfind -onlyin ~ "kMDItemKind == 'TextMate project'"', 
projects = projects.concat( (widget.system('mdfind -onlyin /Volumes/iDisk 
                 "kMDItemKind == 'TextMate project'"', null).outputString).split("n"));

Save this file and you’re done.

Is there a more ‘javascriptesque’ way to do this?
Is there something like += for Arrays in JavaScript?