Main Content RSS FeedLatest Entry

New MacBook Pro (again)

When they came out in October, I bought myself a brand new MacBook Pro to upgrade my seriously aging PowerBook G4. It was a great investment. This thing is thinner, lighter, (comparatively) blazing fast, and has a crisp and bright screen.

So you can imagine my surprise last night when I’m sitting on the couch and my MacBook suddenly turns off while I’m using it. When I try to turn it on again, I hear the fans spin up, the light on the front comes on, but the hard drive doesn’t spin up and the screen stays sadly black.

This morning I tried all the troubleshooting steps for this kind of problem, but no avail. Then I made an appointment with the Genius Bar down at Fashion Valley. The guy behind the bar examines it for 5 minutes, then says “I’m gonna give you a new computer.” Sweet! Given the new hard drive location, he just swapped my old hard drive into the new machine.

Now I’ve got a spanking new machine, fresh battery, and all my data. Very happy. I know it’s trendy to gripe about Apple when their products fail, but you can’t beat their customer service (at least, when your purchase is under warranty or Apple Care).

Recent Entries

Command Line Tricks to View GData Responses

I’m on the command line quite a bit at home (Mac OS X) and at work (*nix). I’ll often strew together a bunch of commands with pipes and redirects, and I usually think “That was useful. I should write that down.” Here is the first installment, of probably zero more, where I’ll actually fulfill that promise to myself.

The problem was that I needed to view the raw GData query responses while working on TubePress. The method I used could probably be used for any Atom or RSS service just as well.

wget was working to some extent, but it was a pain in the ass to get it to just display to stdout instead of writing to a file. It’s probably possible but I got impatient with the man file.

curl seemed a lot more promising in that it spits out the HTTP response to stdout, but when you try to pipe the output to anything, you get a nasty status bar in the output. For instance, if you run

# curl google.com | less

you’ll get something like


% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 219 100 219 0 0 364 0 --:--:-- --:--:-- --:--:-- 0
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>301 Moved</TITLE></HEAD><BODY>
<H1>301 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>

You can hush curl’s progress meter thingy with the -s switch:

Drumroll please, here is the final command:

# curl -s "http://gdata.youtube.com/feeds/api/videos?q=hough" | xmllint --format - > out.xml

You can see that I sent the HTTP response (which is just a slew of XML) to xmllint for formatting, then spit the final result out to an XML file. One gotcha is that for URLs with many parameters, you’re best off enclosing them in double quotes when passing them as arguments to curl.

Anyone else have an easy way of viewing raw XML responses?

Go see this movie

Let the Right One In is a Swedish movie about vampires and the struggles of pre-adolescent youth. Sounds a bit silly, but this movie was superbly well done. It has classic horror film elements, but the gore is perfectly balanced with a very likable storyline about childhood friendship, love, and growing up.

Cat Bath!

Associate Professor Butters and Senator Grits got fleas. I saw some of them crawling around Grits’s face and neck last week, so I knew they were gonna need some tough love and a little medicine.

First step in flea treatment… bath time! These guys like to play in the shower tub, but they had a sudden change of heart once the water was on. I did one at a time, and had to keep one hand holding them in the tub while I did the cleaning with the other hand. Thankfully, Melissa was there to help as well as capture the event on film. They look like Gremlins afterwards.

Though the cats screamed and complained, I’m really happy that I bathed them. They smell delicious now! And their fur is soft and noticeably cleaner. Here are some lessons learned:

  1. Wash one cat at a time
  2. Get in the tub with your cat, and wear a swimsuit to protect the jewels
  3. Getting the cat’s head wet seems to calm them down a bit. I noticed that if I started with the rear of their torso, they freaked out. Once their head was wet, they seemed to fight a bit less.
  4. Use cat shampoo (yep, there is a factory somewhere that makes shampoo for cats)
  5. After the bath, create a relaxing environment for the kittehs. Loud noises and sudden movements freaked these guys out for the rest of the day.

And for the fleas, I really do recommend shelling out the cash ($50 for 4 treatments) for Bayer Advantage. It’s easy to apply, and killed every single flea on the little guys. Good stuff.

Enjoy the pics!

Dear Apple: Please bring this to the iPhone

From the iPhone

Just got the new WordPress app for the iPhone and figured I’d give it a try. Oh and here’s a picture of Associate Professor Butters. How’s everything look?

CNN.com reads ehough.com

A few weeks ago, Melissa and I took a weekend trip up to LA to do some sightseeing. While sitting around in traffic, I spotted a gas station with outrageously high prices ($4.50/gallon) and took a picture of it. A few weeks later, during work, Chief tells me that the front page of CNN.com looks familiar. As it turns out, they used a picture of the exact same gas station for an article on high gas prices.

Here are the two pics. Notice the trees and light poles in the background match. Crazy!

Picture I took while in LAPhoto I took in LA

CNN.com Screenshot Front page of cnn.com a few weeks later

Don’t let it happen to you!

Peleh Bennet Shaltes

Peleh Bennet ShaltesNoah and Eva are the proud new parents of a baby boy! You can read about their adventures as new parents on their new site. World, please prepare yourself for the ultimate in model parenting.

Finally on Google Maps : Carlisle, PA!

CarlisleWhile messing around with Google Maps’s new edit feature, I was pleasantly surprised yesterday to find that my hometown got an updated set of satellite images. Sweet! In the past you couldn’t really get past a blurry town-level view of the area. Now you can zoom in almost all the way, so you too can explore from above all the momentous sites from my childhood including: