Using ASIHTTPRequest on the iPhone

February 15th, 2009

ASIHTTPRequest is a great wrapper around HTTP requests on OS X which also supports the iPhone API. If you want to use it on the iPhone you need a Framework, that is usually part of CoreServices on OSX. CoreServices is not available in the iPhone API though. What you need to do is adding the “CFNetwork.framework” to your iPhone project in Xcode or ou will run into errors when linking the project. The framework is usually located here (iPhone SDK version can change, obviously):

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.1.sdk/System/Library/Frameworks/CFNetwork.framework


Brezenknödel Rezept mit Bildern

February 12th, 2009

Brezenknödel sind eine leckere Beilage, die nicht, wie Semmelknödel, als Kugeln gekocht werden, sondern als Wurst in Alufolie gerollt. Als Grundlage nimmt man 2-3 Tage alte Laugebrezeln oder -Stangen, und zwar ca. 250g. Das sind etwa 3 Laugenstangen.

Das Laugengebäck schneidet man zu kleinen Würfeln.

Nun mischt man ¼l lauwarme Milch mit 2 Eiern und ein bißchen frisch geriebener Muskatnuss. Diese Eiermilch gibt man unter die Brotwürfel und würzt das ganze ordentlich mit Pfeffer und Salz. Dazu kommt noch eine halbe fein gewürfelte Zwiebel und ordentlich gehackte Petersilie. Das ganze wird nun gut vermengt und dann 20 Minunten ziehen gelassen.

Sodann wird eine Lage Frischhaltefolie über eine Lage Alufolie gelegt. Auf die Frischhaltefolie wird die Brotmenge gehäuft und grob verteilt.

Danach wird die Masse fest zu einer Rolle zusammengerollt, zunächst die Frischhaltefolie und dann stramm drummherum die Alufolie. Die Enden der Alufolie müssen kräftig zusammengedreht werden.

Die Brezelknödel Wurst wird nun 20 Minuten in fast kochendem Wasser gesiedet. Danach die Wurst herausnehmen, Folie entfernen und in Scheiben schneiden. Guten Appetit!

Übrig geblieben Brezelnknödel-Scheiben können im Kühlschrank aufgehoben werden und schmecken besonders gut, wenn Sie in Butter angebraten werden.


Don’t think, just take the lens you like

February 4th, 2009

All the photography gear people got today often leads to a lot of pressure. Friend contemplated for quite a time what lenses to take on a 2 week trip to Far East. My approach was: Just take the 2 lenses you like and first come in to your mind and THEN think about how to use them on location. On casual trips I feel totally comfortably with just a 50mm fixed lens. Add a 24-70 telezoom or something like this and you are pretty much prepared.
I think this applies to most “shoot on the trip” holidays if you’ve not actually got a “real” assignment.


Kabel Deutschland Suchseite bei falscher Domain abschalten

January 22nd, 2009

Kunden von Kabel Deutschland kennen sicherlich die nervige Suchseite von Kabel, die angezeigt wird, wenn man eine Domain oder Internetseite eingibt, die nicht existiert. Ich habe eine kleine Lösung dieses Problems programmiert, die auf Google, anstatt auf die Kabel Suchseite umleitet. Mir persönlich ist die Google Suchseite lieber, da es mir gegen den Strich geht, dass Kabel Deutschland ungefragt meine falsch eingetippten Anfragen “hijackt”.

Um die Kabel Deutschland Suchseite abzuschalten müst Ihr in die Datei “/etc/hosts” folgende Zeile eintragen:

213.239.197.252 nxr.kabeldeutschland.de

Unter Linux und Mac OS X fidnet ihr die Datei einfach unter “/etc/hosts”, unter Windows XP oder Vista in der Regel unter “c:\windows\system32\drivers\etc\hosts”
Nach dem Eintrag müsst Ihr ggf. euren Browser neu starten oder euren DNS-Cache leeren, damit die Weiterleitung funktioniert. Unter Windows geht das zB in der Kommandozeile mit “ipconfig /flushdns”.

Die Suchanfragen werden durch diesen Eintrag über onlinenerd24.de an Google weiter geleitet. Ich selbst verdiene damit natürlich kein Geld, ich mache das nur, weil mich die blöde Kabel Deutschland Seite so nervt.

Alternativ kann man auch andere DNS Server benutzen, als die von Kabel Deutschland. Es kann allerdings sein, dass diese etwas langsamer zu erreichen sind. Freie DNS Server findet man zB unter http://www.opendns.com/.


Mirror a UIView with the iPhone API

January 6th, 2009

Just a very brief note on how to mirror UI elements on the iPhone with Cocoa. You need to apply a CGAffineTransform to flip the element horiziontal or vertical, like in the examples:

view.transform = CGAffineTransformMakeScale(-1, 1);


iPhone AppStore promo codes for Speedbox

December 21st, 2008

Yesterday I released a big update to my iPhone App SpeedBox. Since over 6000 users updated to this new version, I guess this application is still kind of popular.
So I’d like to give away 10 promotion codes for a free version of SpeedBox. US-based users can redeem these codes in the AppStore and download SpeedBox for free. Unfortunately Apple only offers promo codes for US customers. I will be more then happy to give away some codes to international users, as soon as Apple allows, though.
So, without durther ado, here are the codes. Grab them while they are hot. If iTunes tells you that a code is not valid anymore, someone else was faster.

4RYHP9TWW7NK
HFRK3HY6HLKY
ML7KEARW9X3W
HWFKP94KT4WP
9X3MEEXWNF47
JNTEKWEA3YAP
7P6X7WR6JLAP
3WYTF9763PTK
FJE6A7ETHXPH
LLPKLRHTPXKY

  1. Copy a code
  2. Open iTunes, go to AppStore
  3. Click “Redeem” on top right
  4. Try another code when yours is not working
  5. Tell me if you liked the app via the contact form ;)

SpeedBox displays the current speed you and your iphone are traveling with. With the latest update it will show you an anlog speedometer, both for mph and km/h mode. You also get a handy graph that shows you how fast you where going in the last minutes.
While this may look quite silly at first, it can be really entertaining to track your speed. Probably not while walking to your neighbor shop, but in trains or airplanes for example.

SpeedBox


Make your CALayer invisible to hittest

December 21st, 2008

Just a short tipp for iPhone developers. Maybe you’ve got several stacked (by CALayer addsubview) CALayers and want to get touch events for some sublayers, but need to make other CALayer see-through for hit-testing with the CALayer hittest method.
All you need to do is implement the containsPoint method to your CALayer subclass and return FALSE. This will make hittest look farther down the Layer stack for touchable layers.

- (BOOL)containsPoint:(CGPoint)p
{
return FALSE;
}

Make a CALAyer transparent for hittest.


How to listen to BBC web radio stream from outside the UK

December 20th, 2008

The british BBC not only produces am excellent TV program (Top Gear anyone?) but also a very good radio lineup. So, if you’re fed up with utterly crappy local radio stations, just like me (rant about the total shitty radio stations in Munich coming up soon, probably), you might want to listen to the BBC’s online radio streams.
Unfortunately, and most probably due to stupid music industry license problems, the BBS does not “broadcast” their programming to the “whole internet”. Yeah, I know, I know, this sounds funny… Of course again the internet shows it’s nicer sides, because it lets you listen to good radio programs nevertheless. Here’s how:

BBC offers it’s radio programs in various streaming formats. One is unfortunately Realmedia, which is, as we all know a total shitty company, whose “player” (aka. crappy malware) will never get on my computers. VLC implements Realmedia, but at least at my place the playback stops after a while and then comes back sounding like rubbish. Making the playback buffer larger helps a little but after a while the problem comes back…
The good thing is, that the Realmedia stream seems to be available from outside the UK. So, if you are insane and have the scrappy Real Player on your computer, you might just use one of the streams from this list: http://support.bbc.co.uk/multicast/streams.html

But of course we want to listen to BBC using VLC, because we want to record the brilliant saturday night’s Essential Mix. So when crappy Real crap (I really hate this stuff) doesn’t work correctly, we need to look at the other streams offered by the BBC. One is a WMV Windows Media Stream, which has also a higher bitrate. These streams can only be accessed from within the UK.
What you got to do is use a Proxy server located in the UK, when opening this stream. You can use this list to discover free proxy servers in the UK: http://www.xroxy.com/proxylist.php. Just enter one of these proxys into the the “Input&Codecs” tab of VLC’s preferences. Don’t forget to set the port number as well. Then, just open the stream’s URL (should end with .asx) from the “Open Network” menu entry and after a while the program should begin playing.

You can also start VLC with the correct proxy and stream URL from the command line:
VLC mms://wmlive-acl.bbc.co.uk/wms/bbc_ami/radio1/radio1_bb_live_ep1_sl0?BBC-UID=242934ec303114dd438f3944e0e064f950d2343050209104644fd6af1214acab&SSO2-UID= --http-proxy=217.10.144.155:3128


Called by the devil

November 5th, 2008

OMG! Take a look who just called me!!! Unfortunately I was already in a call with the number “0″ here in Germany, as you can see. I feel really important now :)

I have honestly no idea what was going on there. I guess either the caller with “+49 0″ was somehow scrambling the caller-id or the callerd-id display of T-Mobile was fucked at the moment. It was a call from a german TV station, btw. :)


Der Spiegel und die Mac-Überschrift

October 15th, 2008

Nach der gestrigen Vorstellung der neuen Macbooks war man sich bei spiegel.de wohl nciht ganz sicher, welche Überschrift denn nun am besten zu dem Artikel passen würde. Im RSS Feed kann man nämlich jede einzelne Version sehen, wenn die Redakteure die Überschrift nach der Veröffentlichung nochmal anpassen.

Und so sieht die Historie aus:

21:42h Laptop-Show: Apple veredelt das MacBook
21:58h Laptop-Show: Apple verbilligt das MacBook
23:50h Laptop-Show: Apple verbilligt das MacBook – ein bisschen

Aus dem besseren Macbook wurde also schnell das billigere und (aus welchen Gründen auch immer) dann das “ein bisschen” billigere. Stimmt alles irgendwie, aber man fragt sich schon, was da in der Redaktion vorgeht. Haben die keinen Journalismus zu betreiben? :)