Loading

PowerDNS recursor Lua scripting examples

Today, while on the train, i finally took some time to extract some Lua scripting examples to run in PowerDNS recursor from my code.

Creative Commons License

UPDATE: because someone asked if they could use my code for their presentations i hereby declare the code examples linked in this article licensed Creative Commons Attribution 3.0 Unported License

ANOTHER UPDATE: These examples assume that you are using the latest and greatest svn trunk version of PowerDNS recursor, for v 3.1.7.2 and below (you really should update) the scripts will work if you remove any occurence of the destination variable. Also please note that the Packet Cache for the recursor in svn trunk will collide with said destination variable, you will have to disable it to use the lower two scripts in their original form.

Would you like to know more?

So here we go.

The first one is a simple override.

The second one is about query logging with some conditions.

And finally this should be a working example for NXDOMAIN Redirection aka the Sitefinder way. Yes i know, i know, one does simply not do such an ugly thing but i fear these days many ISPs actually do it. sigh

Just in case if you wanna mock about me using iframe ins this article, i simply was tired of integrating javascript code highlighting into it and turned to pygmentize: for file in ls *.lua; do rm $file.html; echo '" >> $file.html; pygmentize -l lua -f html -F highlight -O style=trac $file >> $file.html; done

grr

Snow Leopard findings part one

It has been so long since i last posted something in here that i really think it’s time for action here. ;)

For Part one of my Snow Leopard findings i’ll just post these two images.

LUA

First is the Lua preview icon. I must admit i did it wrong in the past too but got corrected by the kind people in #powerdns on IRCnet that this is not a language to pronounce in uppercase. And here is why. (See the “What’s in a name?” section.)

back 30s

My other find is that well yes the Safari QuickTime integration now is just as anthracite as in QuickTime X (or 10 if you like) in general, but has obtained a button that you can hit to go back 30s instantly. I’m not sure if i’ll really make use of that feature but i did notice that i occasionally have to rewind some because a distraction let me miss some important part of a video clip.

Music Video Product Placement

I was a bit surprised when i saw product placement taking place in newer Lady GaGa Music Videos and toyed around a bit with iMovie after that, here is the result:


It’s my first time with iMovie and the first time i’m embedding a flash video into my blog, so don’t get hazy on me mkay? I’m a systems administrator, not a media guru. ;-)

TextMate color theme

I am using a customized version of the TextMate Midnight theme for some time now and just thought i should put it online.

This is the link where you can get it.

And here is how it looks:

django-blues1.png django-blues2.png

zap.li aka INTURLR — Internationalized Non-Sanitizing Tiny Uniform Resource Locator Redirection

Although i secretly launched the site quite some time ago, my new just for fun project INTURLR aka the Internationalized Non-Sanitizing Tiny Uniform Resource Locator Redirection accessible at http://zap.li aparently needs some promotion.

Why did i do it?

Well, a certain someone registered the german umlaut domain sorry cannot display this here.de and just then realized that most web applications like for example various tinyurl redirection services are unable to cope with that kind of character gibberish. I tried several of those myself and was unable to find even a single one that does it alright so i thought i’d just try punching something up myself.

That however was not all that simple as i found out you cannot simply redirect to any URL someone punches in, you have to encode it to punycode because HTTP seems to be 7bit-clean for the header part. No i haven’t really looked into it at all, maybe i should. ;)

It’s written in Python Django and kept very simple for now.

Thats just about it. Maybe i’ll even add personalized accounts where you can avoid expiration of the redirection later, for now please do not hesitate to send feature requests.

The omnious self-repairing laptop battery

Ok, so not long ago i though, hmm my laptop battery is rapidly degrading, and Mini Battery Logger claims it has like 4 months of life left, now i’m not so sure anymore…

mini battery logger status

mini battery logger health

This is a bit weird right?

No there has not been anymore battery ‘firmware’ patches by Apple as far as i can remember.

oneliner speedup

for table in mysql more_power -e "show tables;"|grep -v "\-\-\-"|grep -v ^T; do mysql more_power -e "ALTER TABLE $table ENGINE=InnoDB;"; done

Bert Hubert finaly blogs (again)

Ok, so Bert Hubert wrote another article and i thought: “damn, now i need to think of something to post to my blog in order not to lag behind”.

Well guess what i found something to blog about. That very same post that you can also digg btw. ;-)

What he says is in essence that for large programming projects you go through a refinement process that you have probably never planned for but nonetheless will experience just as he has with PowerDNS and that you need a userbase that does error reports and sticks with the project in order to pull it of.

Wait, users? Oh yeah thats me too… Hmm so this post is about me, err no us. Hello community.

Btw. what he says about the PowerDNS recursor is very true, it is a remarkably mature product now.

Starting with version 3.1.4 i did not experience a single software induced crash of our 20 running recursor processes where with BIND9 it was a bi-weekly annoyance. Also the switch to PowerDNS recursor cut SERVFAIL responses to half of what they were before.

Update: I need to correct myself there, median SERVFAIL responses are roughly 1/10th of what i experienced with BIND9 longterm. That may of course denote that authoritative Server operators are more on the lookout for misconfigurations now than they were ~3 years ago, but i seriously doubt that.

Second Amendment: Ok the title was corrected, Its not Bert Huber, sorry ;)

MTV awards gonna be Rick Roll’d?

yay — It worked, thank you my million trillion readers. ;-)

As the BBC just reported Rick Astley is nominated for an MTV Europe Award.

The Big question that remains is: Will all viewers of the event actually be Rick Roll’d? ;-)

Rick Roll’d

So i got Rick Roll‘d eh?

rickrolled

Well this time i’m just doing this: I’m admitting it. How about that. ;-)

Interestingly enough another youtuber by the name of kieron97 seems to have had the same view count on the screen as me:

OMFG RICK ROLLS R GONNA MAEK DA WORLD END Oh, and im the 6,666th viewer. Cool, eh?”

Alright my quadrizillion readers how about we promote Rick Astley for Best Act Ever on MTV’s Europe Music Awards?