The Phing Thing

Try this in phing:

<?xml version="1.0"?>
<project name="tartest" default="tartest" basedir=".">
<target name="tartest">
<mkdir dir="tartest"/>
<touch file="tartest/test.txt"/>
<touch file="tartest/test.__txt"/>
<touch file="tartest/test__.txt"/>
<touch file="tartest/test_._txt"/>
<tar destfile="tartest.tar" basedir="tartest" />
</target>
</project>


I would have expected it to actually DO pack the whole directory.

This works:

...
<tar destfile="tartest.tar">
<fileset dir="tartest" defaultexcludes="false">
<include name="**/**" />
</fileset>
</tar>
...

It’s the same for zip archives.

don’t unclutter dwm

It doesn’t like it. Unclutter is a little program which hides your mouse pointer if it idles.

chaos!

Day 0: Cash registers closed, WLAN working.

The estimates as to when the cash registers would open developed as follows:

12 hours -> rand(6,12) hours -> 22 o’ clock.

I got my ticket despite the troubles. Good riddance as they were sold out the next morning.
Day 1: Topics to look up: GSM security, dnssec, OpenMoko, sleephacking, arduinos, MakerBots
Day 2: Microcontrollers!

vimrc

I had uploaded my favorite vimrc somewhere, but I forgot where…

This is mostly for my reference and not the final product: vimrc

Not a NaN...

I tried to copy a mysql database with several gigabytes of data and suddenly the receiving end chokes on a ‘nan’.

Nani?

Well apparently earlier versions of mysql supported ‘nan’ and ‘inf’ as valid float values but newer versions don’t as they abide by the SQL standard which states:

‘Thou shalt not NaN’

And thus it’s in the data but it won’t go into the new database.
Suckage ensues…

So how do you find all those NaNs to make them something useful again?

Magic!

SELECT * FROM `table` WHERE `value` > 3e+40

If i understood it correctly 3e+40 is larger than maxFloat but NaN wins the comparison. The same can be used to replace all those values with something valid.

Yay!
Go nuts.

Just chilli-ing...

We recently had breakfast at a little place called ‘Caramel‘ and their table-decoration is awesome:

caramelchili

Chili plants!

Livin' in a bad block...

If you ever need to copy a directory structure which contains files which sit on bad blocks on Windows, try XCOPY /C.

I added a little /E /Y and off it went.

Alone in the dark

From my first paycheck I bought something everyone should have.

A FRIGGIN’ HEADLIGHT!

headlight

It’s an actual light sitting on your actual head and one can use it for jogging in total darkness. It’s awesome. Not window-manager awesome, but still…

Yesterday I took this headlight and a pair of jogging-gloves (which are jogging-gloves because they have a KEY COMPARTMENT!!! [Maybe you should get some for Amina, Buck :-]) for a test-jog.

In the olden times, when the fiery ball of the heavens still casteth glorious rays of light on our earth when I got home I had picked a nice jogging round through the nearby woods, approximately 4.5 km which I think is a good distance for an after-work run.

Then came CET and now it’s pitch black when I find the time to run. To solve this I bought the aforementioned gear and BAM!

It’s actually a quite unique experience. I’m glad I’m not easily scared because the headlight gives the whole thing a rather ‘blair-witchy’ touch.
Yesterday it was also raining a little so there was a constant crackling everywhere and the air had a misty quality, waaaay cool.

Even though I didn’t make the whole round and got off-track a couple of times I enjoyed it.

So today I did the same thing and learned a couple of things:

  1. You cannot see black dogs in the dark until they bark and look directly at you and then THEIR EYES GLOW!
  2. I’m not easily scared but some things still give me the creeps
  3. You actually do run a little faster afterward, even though you’re tired :)

I thing I’ll try to do that every 2 days at least.

You can't hide from the python

I’m a command line freak and thus I want to read the call logs from my newly converted Freakz^wFritz!Box from the command line.

First I tried to mess with the telnetd on the box but I didn’t find the logs and as it is possible to fetch a csv-file containing the call-log via the web-interface I turned my attention to that.

In the olden times it was apparently possible to just log into the boxes webinterface by POSTing the password, save the cookie and request stuff.
Nowadays AVM has implemented a challenge-response protocol using javascript. If you can answer a challenge with the correct md5 hash you get a session id to use the web=interface.

This might be a nice thing from a security perspective but it sucks a little for scripting. Meh.

But a little python magic solves the problem.

So here you go: fritzlog.py

Usage: python fritzlog.py <password>

You can also edit the script and make your password the default.

Speedport and back again

I wrecked my trusty Asus WL-500GP while experimenting with different WLAN
hardware and so it was time for a new router.

Lucky me, I got my hands on a Telekom Speedport W701v, which has (apart from
USB and draft-N) all features I could wish for in a router. WLAN, SIP telephony
and … well that’s it actually, but it’s all I really need every day anyway.

So I plug it in, fire the webinterface up and… IT CANNOT BE USED WITHOUT DSL.
At least I didn’t find a way to hook it up to my cable modem and let it use DHCP to
connect.

Well, I’ve got to admit that this doesn’t mean that I am *sure* that there is
no way to do it but the interface is _so bad_ that even if there was, I
couldn’t find it and I *do* usually get my gadgets to work, just ask anyone who
knows me. I mean c’mon!

Just another brick in the wall between me and the german Telekom. It’s a sturdy one
by now.

I knew I could put OpenWRT on there, but I really wanted to use the VoIP
capabilities and such began the googling which eventually lead here:

http://wiki.ip-phone-forum.de/skript:speedport2fritz.

The Speedport W701v is an AVM OEM product and very similar to the Fritzbox
7170. It’s actually similar enough that one can swap out the firmware, barring
some hardware drivers, and the crafty, layz people of the internet sat down and
wrote scripts to automate the procedure, complete with a menuconfig-style
curses gui for image configuration. Sometimes I just want to hug the internets.

The scripts are a convoluted maze of cross-calling cloc-monsters, so paranoid me
stuck them in a virtual machine and let them run wild.

I’m quite happy with the machine now.