.local domains and Mac OS X 10.10 Yosemite

TL;DR: sudo discoveryutil mdnsactivedirectory yes

After upgrading to Mac OS X 10.10 Yosemite, I found myself unable to access any hosts with a domain name ending in .local

I could resolve the hostname with DNS tools like dig and nslookup, but other tools, namely ssh and ping, refused to do so.

As it turns out, Yosemite (and apparently also iOS 8) changed the way of resolving host names ending in .local to conform to the relatively new RFC 6762.

After much digging I found a fix in the Apple support forums:

sudo discoveryutil mdnsactivedirectory yes

Note that this fix only lasts until the next reboot.

Maxing out a HP4

For my birthday, I treated myself to something special: I rented a BMW HP4 for a day.

Foto 3With 196 HP from 1000 cc, 199 kg and every electronic gizmo you can imagine, the HP4 stands at the pinnacle of German motorcycle engineering. Now, you might wonder who is crazy enough to rent such a monster. As it turns out, Sixt is! Initially, I wanted to rent a S1000RR, which is basically the same minus the magic electronic suspension of the HP4. But when the rental agent offered me an upgrade for just 20 Euros, I couldn’t resist. Read on to find out what that day brought.  Continue reading

Nürburgring Nordschleife: GT5 vs. IRL

For a long time, I wanted to drive the famous Nordschleife of the Nürburgring. Having seen enough crash videos on YouTube, I realized that some preparation would probably be a good idea. I decided that doing some laps on Gran Tourismo should do the trick.

So I went out to acquire a PlayStation 3, a Logitech steering wheel and a copy of Gran Tourismo 5. To my horror, the Nordschleife was not available out of the box! Had I just spend 400 € for nothing? As it turns out, you have to complete the AMG driving school special event to unlock the Nordschleife. It’s a good way to get to know the track, although you will probably not do your first laps in a historic Mercedes 300 SL.

This brings me to one of the most important aspects of your Nordschleife experience: the car. My problem: I don’t have one. One could probably drive in a regular rental car, but you will probably have issues with the insurance in case of a crash on the Ring.
There are several rental companies around the Nürburging that offer cars specifically for driving on the Nordschleife, most notably RentRaceCar and Rent4Ring. The cars are usually equipped with better brakes, suspension, tires and a roll cage and, most importantly, are properly insured for the Ring. That said, all cars that you can rent still have quite a hefty deductible. Before you sign the contract, make sure that a crash would not be a total financial disaster.

I had set my sight on a Suzuki Swift from RentRaceCar. 130 hp and 1000 kg curb weight promised a lot of fun at a reasonable price. I deliberately chose a low-powered, front-wheel-drive car for my first laps on the ring.

As a consequence, I used the Swift for almost all of my virtual driving. It might be tempting to do a hot lap in the Zonda R, but I wanted to keep it as real as possible.

My plan was to go the Ring once I could complete 10 consecutive laps under 10 minutes without crashing. My best time for a full lap on the PS3 with the Swift was 9:25, but I never managed more than three laps without impact. As the months went by and the days became shorter, I decided that I had enough training and scrapped the plan of 10 under 10.

October 20, 2011 was the big day. (Yes, 2011, this post spent a lot of time in the drafts folder). It was a Thursday. The car was reserved, the weather forecast was looking good and I was eager as rarely before. A good friend of mine agreed to drive me to the Ring and act as codriver. It probably helped that I forgot to mention my failed plan of 10 under 10.

As we got closer to Nürburg, the road got more and more wet. However, there was no way back and we soon arrived at Rent Race Car. After handling the formalities, the friendly staff gave me a quick introduction to the car and valuable tips for my first laps. The customer service leaves nothing to be desired, but note that the cars only have a roll bar (not a roll cage) and the deductible is a whopping 2500 €. Rent4Ring offers a Swift with a full roll cage for a slightly higher price.

We arrived at the entrance of the Nordschleife about 20 minutes before the track opened, enough time for a coffee to increase the nervousness and a quick stroll over the parking lot where a couple of fellow track enthusiasts had gathered. It was a calm day with maybe thirty cars in total, including a couple of nice Porsches and Lotuses.

Then it was time. The track opens. You roll up to the toll gate. You drive through the corridor of pylons. Accelerate. Past the bridge. This is where the time starts. On the slight downhill to Hohenrain, you quickly built up speed. On the first turn, it becomes immediately clear that this is the real thing and no amount of time sitting on your couch twisting your fancy force-feedback wheel prepare you for it. With a wet track, there was quite a bit of understeer on the last turn before the start line. That’s scary and reassuring at the same time. It’s scary, because it shows how little grip there was on the damp track. It’s reassuring because you could actually do something about it. The little Swift is forgiving and leaves a lot of room for errors. After the twists at Hatzenbach and Hoheneichen, we approached the first fast section, from Quiddelbacher Höhe to Flugplatz. In the game, you go can go flat out all the way to Schwedenkreuz, which just seemed ridiculous while we were flying down the narrow track at 180 km/h (~110 mph). After passing the turn at Aremberg, the biggest shortcoming of virtual driving became obvious: the elevation. You can feel the pressure in your ears increase as you fall down Fuchsröhre. At increasing speed, you approach the bend in the dip, which seemed much more threatening than in the game, even at 3/4 of the speed. The tight turns at Adenauer Forst seem easy, but that is mostly caused by your incredibly slow speed. You line still sucks. Accelerating towards Metzgesfeld. In the game, you maybe lift, but on the track you definitely brake. Taking it easy through Kallenhard and Wehrseifen, where you always crash in the game. The scars in the wall at Breidscheid remind you that there is no reset button this time. Staying wide at the tricky, tightening turn at Bergwerk. Trying to find some dry spots racing through Kesselchen. Again, slight bends turn out to be proper turns that warrant braking. The fact that the car is much faster than in the game doesn’t help. After another tricky turn at Klostertal, you get the best, but also shortest carousel ride of your life. Considering how the whole car shakes, it seems a miracle that you leave Karussell in one piece. But there is no time to breathe, as you race up to Hohe Acht. You are thrown from side to side, the little Swift diving deep into the suspension at Eschbach. Your stomach complains that nobody told him that he’s going on a rollercoaster ride while you pass Brünnchen. Approaching Pfalzgarten I, where spectators are almost guaranteed spectacular crashes on busy days. Down a massive descent towards Pfalzgarten II, ABS stepping in as you cowardly brake over the small jump. Suddenly a blind turn, where you were expecting a mostly straight line towards Schwalbenschwanz. As you rattle over the second, small carousel, you lose ESP. Only a few past turns on Galgenkopf left, then you approach the gantry, the unofficial finish line for the tourist drive. This was your first lap of the Nürburgring. The probably most intense 20 kilometers of your life lie behind you. Your knees tremble a bit, but a big smile is stuck on your face.

Cut to the chase, what was the time? Unfortunately, only the second and the third of the four laps that I did that day were recorded. My second lap was 11:30 from bridge to gantry, and my guess for the first lap is somewhere north of 12 minutes. Way slower than my time on the PS3, way slower than anything I had seen on YouTube, way slower than Jeremy Clarkson in a diesel or a girl in a van.

Does it matter? Not really. Driving on the Nordschleife was one of the best experiences of my life, period.

Were those hours playing Gran Tourismo 5 well spent? You bet! Although playing the game doesn’t even come close to reality, it helped tremendously to know the track layout and to have a rough idea of how fast a turn can be taken. But there are many subtle differences, so take it easy on your first laps and don’t expect to beat your virtual times.

Have fun and stay safe!

Restricting Solr with Jetty to localhost

If you want to try Apache Solr, the easiest way to get started is to use the example the comes with the download. Just run java -jar start.jar and you can start searching like a pro.

However, the integrated Jetty server is configured to bind to port 8983 on all IP adresses by default. This configuration is unsafe: anyone could clear your whole Solr index!

It is a good idea to let the server listen only on localhost, unless your server is in a private network. A quick solution is to set the system properties jetty.host and jetty.port on startup, e.g. like that:

java -Djetty.host=127.0.0.1 -Djetty.port=1337 -jar start.jar

Alternatively, you can edit the configuration at example/etc/jetty.xml. Look for these lines:

<Set name="host"><SystemProperty name="jetty.host" /></Set>¬
<Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>

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!

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