Jeff Chausse

Digital Strategy + Design

Zoom Zoom

My friend Jenny asked me what I’ll put in the CD player for my first ride in the Tribute. I hadn’t given it much thought, but I decided the only appropriate tune for the occasion would be the “Zoom Zoom” theme from the Mazda ads. After much web surfing, I located it in MP3 format. It’s by a band (or person — I’m not sure) called Serapis Bey and, apparently, is done in the style of music associated with “Capoeira”, a Brazilian form of martial arts.

Anyway, yadda yadda… If you want to play along, enjoy this MP3, otherwise only available on the soundtrack to a film about said martial art.

Update: Sorry, MP3 has been removed because it was accounting for 85% of this site’s bandwidth.

Zoom-Zoom

Following up my last post (and another brake noise fix, and a new catalytic converer)… Meet my new car:

I pick it up tomorrow :) My very first new car… Only 19 miles on it :) That’s four orders of magnitude less than my trade-in.

Cars Suck

Everything that could possibly go wrong with my car has been going wrong lately. In the past month, I’ve replaced all four tires, all the brake pads and rotors, and nearly my entire exhaust system. I think my car knows that I got my tax refund freakishly early (in January!) and it wants to ensure all that money goes to IT, and not my girlfriend, or food, or rent.

Anyway, last week, I brought the car in because the brakes were making a weird noise. They replaced the rotors and it sounded great for a while. Saturday, it started making an even worse rattling noise… I brought it in this morning and said “Hey, my brakes are making a rattling noise!” 6 hours later, I call them up and ask what the deal is. They explained that when they replaced my rotors, they forgot to put on “anti-rattle clips”. Now, I’ve just verified that there is indeed such a thing as an “anti-rattle clip”, but you can’t tell me that doesn’t sound like a fishy explanation…

“Hey, my steering wheel fell off!”
“Oh, you need a new steering wheel not-fall-off gasket.”
“Oh.”

Not that anyone WANTS to see my face on live video…

In order to use AIM’s video conferencing behind a firewall, you simply need to open THREE THOUSAND, NINE HUNDRED SEVENTY SIX ports. That’s just wacky.

FrontPage Cleans Up (?)

Microsoft FrontPage, long ridiculed by professional developers as a generator of hideously ugly and just-plain-wrong code has a new ad touting its enhanced code-cleaning abilities. Curiously, the “cleaned up” code in the banner ad is invalid.

A couple other interesting bits… The “bad” code in the ad actually comes from Dreamweaver (you can tell by the “MM_” bits). And the “bad code” also comes from a Mac, as evidenced by the “Monaco” font. Apparently, “real” programmers code HTML on Windows, using variable-width fonts.

Running UNIX commands from OS X’s Finder

Mac OS X is a rather schizophrenic beast. Part ultra-modern GUI, part hard-core command line system. Yup, they’re both in there. So, whichever way you care to work, you can get things done. Unless, of course, you want to do something using a little bit of each. Then OS X is a pain in the butt. All the icky UNIX stuff is mysteriously invisible to the Finder and all the slick Finder stuff is largely useless from a UNIX “shell”.

You can sort of work around it by using “Go to Folder”, and open up, say, “/etc”. Ooh, looky all the weird UNIX stuff. But, then, it won’t let you create aliases to that stuff. Dang, so close.

My initial goal: To be able to edit my “hosts” file (/etc/hosts) by clicking on an icon in the Finder. I paid plenty of money for this fancy UI, I should be able to do that, dammit.

My extended goal: To create a directory called “UNIX Commands”, into which I could add click-to-run icons for all those down-and-dirty UNIX things I need to do now and then.

Now, mind you, I have a bona fide Computer Science degree from back when “Windows” and “Mac” were purely extra-curricular “novelty” topics, so I’m not afraid of a little UNIX now and then. I’m going to explain this in a manner assuming you know a tiny bit of UNIX.

OK, here’s what I’ve done to get things working the way I wanted.

I put my “UNIX Commands” folder in my user folder (because I have that in my dock and can just click-and-hold all the way to launching the commands). I’ll assume you’re fine with this idea.

So,

Step 1: Create a folder called “UNIX Commands” in your Home (username) directory.
Step 2: Launch the Terminal from Applications/Utilities
Step 3: Go to that directory… OK, I’ll help you out:

cd /Users/yourusername/Desktop/Unix Commands/

Step 4: Create a text file using your favorite UNIX editor (I use emacs). I’m calling mine “edithosts”

emacs edithosts

Step 5: I can’t teach you how to use emacs, or any other editor, but however you manage to do it, edit the file so it looks like this:

!# /bin/bash
sudo emacs /etc/hosts

That second line should be whatever UNIX command you want to run. As I said before, I’m using this to edit my “hosts” file. The first line is the same no matter what. It tells UNIX (Darwin) – hey, execute this file with “bash”.

OK, save your file and exit the editor.

Step 6: You must tell Darwin “officially” that this is an executable file. You do that by typing this at the terminal prompt:

chmod +x edithosts

OK. Cool. Now exit the Terminal. We’re done with all that for now.

Step 7: Back in the happy, colorful world of Finder, open up your “UNIX Commands” folder. You should see your file there, looking like a boring piece of paper. Go ahead and double-click it. Finder will whine that there’s no default application to open the document. Click “Choose Application…”. Switch “Enable” from “Recommended Applications” to “All Applications”. Choose “Terminal” and click Open. Here’s the gerat part… Finder will tell you: “It is not known if this application can open Unix Executable File files”. Say “Duh” (optional) and Click Open. Finder will pop up ANOTHER weird dialog saying “an error occured while changing the application that opens “edithosts” because not enough information is available. Do you want to open “edithosts” with “Terminal”. Say “Duh” again (optional) and Click “Update”. Say “Duh” again because the dialog asked you a yes or no question, and you’re given the options of “Don’t Update” and “Update”.

Step 8: You did it! Right now, your UNIX command should have executed.

Hey, that was pretty cool. Here’s the neat part though… When you need another command, don’t bother creating it from the Terminal. You can duplicate your existing command right from the Finder. Conveniently, OS X will remember the “executable” attribute you set in Step 6. Inconveniently, the first time you run your new command, you’ll have to go through all that silliness in Step 7. Eh, no biggie.

One last tip… To make your life WAY easier, make an Alias for TextEdit in your “Unix Commands folder. That way, when you create a new command by duplicating an old one, you can just drag-and-drop it into TextEdit to change the actual command. Super cool!

[Administrative note: This blog entry was written late at night with little regard to coherency or grammar. I just wanted to get my little victory online as quickly as possible. It might be edited for clarity in the near future.]