Blog

An overview of all posts of all sections.
Posted on 2012 • Jan • 16 vsftpd - security by obscurity? Written by eyebex • Click to link

Oh-my-god. I just learned about this insane habit of vsftpd to mix plain text error messages (that do not show up in any log otherwise) into the encrypted data stream for an FTP connection. In conjunction with this recent change in behavior that makes debugging connection errors real fun. Not.
Posted on 2012 • Jan • 09 Get the total size of all files added in a Git commit Written by eyebex • Click to link

Ever wondered how to get the total size of all files added in a Git commit in order to find a fat commit? Well, here's a script for that:
1
23
45
67
89
1011
1213
1415
1617
1819
2021
22
#!/bin/sh
 if [ $# -ne 1 ]; then
    echo "Rationale : Get the total size of all files added by the specified commit."    echo "Usage     : $(basename $0) <commit>"
    exit -1fi
 blob_sizes=$(git diff-tree -r -c -M -C --no-commit-id $1 | grep " A     " | cut -d " " -f 4 | git cat-file --batch-check | cut -d " " -f 3)
total_size=0 
for size in $blob_sizes; do    let total_size+=size
done 
if [ $total_size -gt 0 ]; then    total_size_kib=$(echo $total_size | awk '{printf "%.2f",$1/1024}')
    total_size_mib=$(echo $total_size_kib | awk '{printf "%.2f",$1/1024}')    echo "The commit adds files totalling in $total_size bytes ($total_size_kib KiB, $total_size_mib MiB)."
else    echo "The commit does not add any files."
fi
Note that the whitespace after the "A" in the grep-expression is a hard-coded tab character (\t), not just a space like before the "A". To avoid any copy & paste errors, download the file from my GitHub repository which contains some more potentially useful scripts.
Posted on 2011 • Oct • 27 GALE & GLEX are available on SourceForge now Written by eyebex • Click to link

As BerliOS will be closed by the end of the year, I've copied the Git repository (for GALE 2, GLEX 1 and GLEX 2) and the SVN repository (for GALE 1) to SourceForge. As SourceForge was already hosting another project with the Unix name gale, my project is now called gale-opengl.

Usually, SourceForge would not have been my first choice for hosting an Open Source project (e.g. GitHub is much nicer these days), but I wanted to have a common place for both the Git and SVN repositories, and according to this table I thought I could use the shell server to create a Cron job which generates the documentation once a day, just to learn that SourceForge has Cron currently disabled. Bummer. So I'm hosting the documentation on here now.
Posted on 2011 • Oct • 14 Visual Studio 2011 still won’t support variadic templates Written by eyebex • Click to link

While installing the developer preview, I was learning from the table on this page that the upcoming Visual Studio 2011 still won't support variadic templates. Now that's a bummer. This means Visual Studio will still not be able to compile such cool projects like clutil or libfbi ...
Posted on 2011 • Oct • 07 Git recursive merge overwrites unstages local changes Written by eyebex • Click to link

A few days ago at work, I was able to reproduce a case where Git is overwriting unstaged local changes in files known to Git when recursively merging another branch. While it's certainly good practice to commit before you merge, according to the git-merge documentation (I'm linking the Ubuntu man pages while kernel.org is down) this should never happen:

"In particular, the local modifications you had before you started merge will stay the same and the index entries for them stay as they were, i.e. matching HEAD."

Curiously, someone else had the exact same issue at about the same time, although the bug seems to have existed in Git for almost a year! The issue was introduced in Git 1.7.4 and was just recently fixed in Git 1.7.7. Loosing code is about the last thing a version control system should do, so my confidence in Git (which I'm otherwise a big fan of) just got a crack.
Posted on 2011 • Jul • 17 Google Code now supports Git natively Written by eyebex • Click to link

As I just learned from the Git mailing list, the issue about native Git support on Google Code just been marked as fixed, and support has been added. According to this blog post there are some minor limitations, but nothing that would affect my current projects, so I'll certainly switch from Subversion soon!
Posted on 2011 • May • 12 Git tips Written by eyebex • Click to link

In case you haven’t guessed so since my post about moving GALE 2 to Git: I’m quite a big fan of the Git distributed revision control system. As such, I’m using it a lot in my job and for my hobby projects. From time to time, I stumble upon some good tips, undocumented functionality, or peculiarities that I find worth documenting somewhere. This is the first post in my “Git tips” series, and without further ado, here’s what I have to say:

  1. To checkout the previously checked out branch, use git checkout - (similar to cd - on Linux).
  2. git cherry-pick does not pick notes, use git notes copy instead.
Posted on 2011 • May • 03 Qt Contributors’ Summit Written by eyebex • Click to link

Just in case you ever wanted to meet me in person, see me at the Qt Contributors' Summit ;-)

I'm attending the Qt Contributors' Summit
Posted on 2011 • Jan • 23 German: Konstruktionsfehler des Gehäuses der FRITZ!Box 7390 Written by eyebex • Click to link

FRITZ!Box 7390 Kunststoffbrücke First of all, sorry for posting this in German, but I guess mostly German readers will be affected: A nasty design flaw of the FRITZ!Box 7390's case, a popular VDSL router manufactured by the German company AVM, causes spurious WiFi disconnects.

Heute hatte ich plötzlich das Problem, dass mein Notebook sich sporadisch nicht mehr per WLAN mit meiner FRITZ!Box 7390 verbinden wollte. Nachdem ich zunächst den Fehler am Notebook vermutete, doch diverse Maßnahmen nichts brachten, fiel mir auf, dass die WLAN-Leuchte an der FRITZ!Box aus war. Ein Druck auf den WLAN-Taster an der Oberseite der FRITZ!Box brachte nichts, und der Schalter ging auch verdächtig schwer (bzw. ich spürte keinen Druckpunkt), doch ich dachte mir zunächst nicht allzu viel dabei. (Vielleicht war es ein Mikro-Taster mit sehr geringem Druckpunkt?)

Daraufhin habe ich das Notebook per LAN-Kabel mit der FRITZ!Box verbunden und per Web-Oberfläche WLAN wieder angeschaltet. Als ich das Kabel wieder trennte, ging plötzlich auch die WLAN-Leuchte wieder aus. Was zunächst wie ein Zufall oder Streich von Kobolden aussah, bestätigte sich nach nochmaligem Versuch: Ein Herausziehen des LAN-Kabels schaltet das WLAN ab. In Zusammenhang mit der Verdächtig schwergängigen WLAN-Taste vermutete ich dann doch eher ein mechanisches Problem. Dank der Hinweise zum Öffnen des Gehäuses (und des Torx-Schraubendrehers meines netten Nachbarn) offenbarte sich dann bald die Ursache: Die dünne Kunststoffbrücke über den LAN-Ports auf die der rote Pfeil in nebenstehendem Bild zeigt kann sich leicht in Richtung des Pfeils verbiegen. Durch den Druck, den der aufgeschraubte Deckel nach unten (hier: senkrecht zur Tischplatte) erzeugt, rutscht die Kunststoffbrücke dann an der Vorderkante des Blechkäfigs für die LAN-Ports nach unten. Dadurch wiederum liegt der Gehäusedeckel tiefer auf als er sollte und der WLAN-Taster drückt manchmal mehr, manchmal weniger doll auf den Schalter, wodurch die WLAN-Verbindung getrennt wird. Interessanterweise scheint die DECT-Taste nicht mehr betroffen zu sein. Was hat das ganze jetzt mit einem eingesteckten LAN-Kabel zu tun? Mein Stecker war so dick (bitte nicht missverstehen ;-), dass er den Gehäusedeckel leicht anhob und dadurch das Problem verschwand.

Meine Lösung bestand darin, die Kunststoffbrücke leicht in die dem roten Pfeil entgegen gesetzte Richtung zu drücken und sie dann entlang der grünen Linien mit Heißkleber zu fixieren. Und siehe da, schon waren meine sporadischen WLAN-Verbindungsabbrüche behoben! Ich würde mal sagen, das ist dann wohl so etwas wie ein klassicher Konstruktionsfehler ;-)
Posted on 2011 • Jan • 01 Using VTK and DirectX in the same application Written by eyebex • Click to link

As a follow-up to the previous post, the mystery about VTK crashing when using DirectX in the same application has been finally resolved about one month ago. To quote myself from the bug report:

"D3D's CreateDevice() by default sets the FPU to single precision (i.e. 24 bits of mantissa) and round-to-nearest mode. While round-to-nearest is the default for C / C++, the default precision is 53 bits, and the magic numbers in vtkResliceRound() rely on it. If vtkResliceRound() is used to calculate the dimensions of an image after the call to CreateDevice(), it returns 0, which leads to the observed crash."

The easiest fix is to specify D3DCREATE_FPU_PRESERVE as a flag to CreateDevice() which "set[s] the precision for Direct3D floating-point calculations to the precision used by the calling thread".
Page 1 of 10:  1 2 3 >  Last »
— ©opyright 2004-2012 by eyebexValidate XHTML 1.0Validate CSS