What’s in a name? A MPMoviePlayerController pitfall

I was struggeling playing a movie file on iOS with MPMoviePlayerController. The file was just recorded with AVCaptureMovieFileOutput and was called file.avi, located in the Document directory of the app.

The movie player was presented and then immediately disappeared. The URL was correct, the file played without problems on the Mac. Apparently, MPMoviePlayerController expects the file ending to match the file type. Once I renamed the file to file.mov, everything worked as expected.

Hacker News Aftermath

After I submitted my review of Hacker News iPad Apps to Hacker News, it shortly made it to the frontpage, with the result that the thundering horde quickly exhausted the tiny traffic quota I had at my hoster. I’ve decided to migrate to another hoster and if you read this, the DNS change has reached your corner of the Intertubes.

If you notice broken links or anything else that is flaky, please let me know on Twitter (@danielhepper) or drop me a mail at daniel [at] hepper [dot] net. Thanks!

A review of all available Hacker News iPad Apps

Browsing Hacker News on the iPad is okay, but far from perfect. As of this writing, there are five Hacker News iPad Apps available on the App Store that promise a more comfortable experience:

I took the time (and money) to try them all, this are my findings.
Continue reading

How to make a Pac-Man ghost lamp

In this post, I will show you how to make a Pac-Man ghost lamp. You can also find it on Instructables.

To be precise, we will create small ghost lamp shades to turn a boring spotlight system into a great looking Pac-Man themed lamp.

You will need:

  • plastic bottles with the right shape
  • a lamp, preferably a halogen spotlight system
  • some white and black plastic
  • spray paint in red, pink, cyan and orange

Once you found the right bottles and a nice lamp, this project will take about 2 x 2 hours.
Continue reading

Fixing a messed up Vagrant installation

I’m currently struggling with what seems like a bug in Virtualbox that affects the new Core i7 MacBooks. While trying to fix it by building Virtualbox from source, uninstalling and reinstalling, I managed to mess up a box managed with Vagrant, rendering it inaccessible.

If you find yourself in a similar situation, you can try to fix it with the VBoxManage command.

$ VBoxManage list vms
"" {b68ed7a7-6e72-4f16-a438-8775cd80d9b3}
$ VBoxManage unregistervm {b68ed7a7-6e72-4f16-a438-8775cd80d9b3} --delete
VBoxManage: error: The object is not ready
VBoxManage: error: Details: code E_ACCESSDENIED (0x80070005), component Machine, interface IMachine, callee nsISupports
Context: "Delete(ComSafeArrayAsInParam(aMedia), pProgress.asOutParam())" at line 175 of file VBoxManageMisc.cpp
Segmentation fault

As you can see, it died with a segmentation fault, but the broken box was now gone and I could restart it with vagrant up.
Continue reading

Change order of PATH entries on Mac OS X

I wanted to have /usr/local/bin to be listed before /usr/bin in my PATH environment variable.

One way to achieve this would be to add a ~/.profile file with a line like this:

export PATH=/usr/local/bin:$PATH

This would result in /usr/local/bin being listed twice. It wouldn’t hurt but it’s not pretty either.

If you look at /etc/profile, you will see that the initial value of PATH is set by path_helper(8).

The right way to change to order of default paths is to edit /etc/paths. It contains one path per line, in descending order. Mine looks like this:

/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin

Verify AWS free tier

Starting from November 1st, Amazon offers a free usage tier for new AWS customers. After finishing the horrible signup process, I was left wondering wether the free usage tier was activated for my account.

To find out, just start an EC2 micro instance*. Don’t forget to stop it. After some time, go to the account activity page and click on “expand all services”. You should see something like this:

* This will cost you a few cents if you don’t have a free usage tier.

And the Nobel Peace Prize goes to: Teh Internetz

It made the news that the Internet has been nominated for this year’s Nobe Prize.

The Internet? Seriously? Just think about all the flame wars the Internet caused. I think some people have to check there calendar, it’s not April 1st yet. What were they thinking?

- “Ok, last year we gave it to Obama, because was so popular. That didn’t really make everyone happy. We need someone more popular.”
- “How about the Internet?! Everyone likes the Internet!”

This just ridiculous. Why not nominate swords? After all, you can hammer them into plowshares.

"Let Us Beat Our Swords into Ploughshares" by United Nations Photo - CC by-nc-nd