Vier Jahre Piraten
Heute findet die ordentliche Piratenversammlung der Piratenpartei beider Basel statt. Bereits vor einigen Wochen habe mich entschlossen, nicht mehr als Präsident der Sektion zu kandidieren. De facto trete ich damit zurück. More…
The dw2pdf DokuWiki plug-in cannot handle RGBA
I was happily using the dw2pdf plug-in for the DokuWiki installation at work when users began reporting broken images in the exported PDFs. One page in particular featured two images – one worked, the other did not. The only difference I found was in the palette used:
$ file deps.png deps.png: PNG image data, 361 x 256, 8-bit/color RGBA, non-interlaced $ file deps-legend.png deps-legend.png: PNG image data, 3476 x 800, 8-bit/color RGB, non-interlaced
The first one was missing in the exported PDF. Apparently dw2pdf cannot handle an alpha channel. Since my theme has a white background, I simply replaced it with white:
$ convert deps.png -background white -alpha remove deps.png && convert deps.png -alpha off deps.png
Be careful, like written here the command replaces the original file. The last file is now in RGB with a white background:
$ file deps.png deps.png: PNG image data, 361 x 256, 8-bit/color RGB, non-interlaced
Note: convert is a tool of the ImageMagick suite (sudo apt-get install imagemagick).
For files that are 8-bit gray+alpha, the following command does the trick:
$ convert file.png -background white -type Palette file.png
These tricks are mere workarounds, but time restraints did not permit further investigation into the inner workings of the plug-in.
Setting memory of Vagrant box
When constructing a new Vagrantfile for the brilliant tool vagrant, I had quite some trouble finding the configuration setting which sets the amount of memory. I found an old variant first:
config.vm.customize do |vm| vm.memory_size = 800 end
Turns out this syntax has changed at some point, at least after version 0.9.99.1 it is now:
config.vm.customize ["modifyvm", :id, "--memory", "800"]
This has worked on my machine (vagrant 1.0.3). Thanks to “miketheman” and his post to the Google Group.
Learning VIM, again
I remember trying to learn how to use vim in my early teens. The first basic steps are easy: navigating, saving and quitting I could quickly pick up. Then I was stuck and gradually moved over to joe. I need to somewhat shamefully admit that until recently, my editor of choice was nano. But then, a co-worker of mine suggested I pick vim up again and I gave it a try. I have to admit, once you learn some of the more intermediate short-cuts, you begin to feel the power of this robust and long around software.
Without a tutorial of some sorts, vim is hard to learn. I was very happy to stumble upon VIM Adventures. It is a brilliant game and an excellent vim introduction at the same time. The ten dollars were well invested!
Increasingly, I miss having the easy but powerful commands available in my other editors. I switched from my evaluation copy of Sublime to vim-gtk and installed the IdeaVIM plugin to have a (limited) vim environment in my development environment.
Design and Analysis of Algorithms II
Der erste Teil des Stanford-Online-Kurses fand im Frühling statt. Ich bestand die Schlussprüfungen und alle Übungen mit 84% – dann begann das lange Warten auf Teil 2. Dieser ist nun bereits in der zweiten Woche und ich stecke schon mitten in der Thematik minimale spannende Bäume. Wie im ersten Teil brilliert der Dozent Tim Roughgarden mit seiner unaufgeregten, bedachten Sprechweise und guten Zwischenfragen in den Videos. Übrigens verstehe ich jetzt endlich auch, was es mit im Ethernet gebräuchlichen Spanning Tree Protocol auf sich hat und was für Möglichkeiten sich anbieten, dieses effizient zu implementieren. Das schönste am Lernen ist doch sowieso, wenn sich bestehendes Wissen mit neuem verknüpft. Diesen Aha-Moment kann nichts ersetzen. Oder fast nichts.
Im 2013 werde ich dann noch einen Kurs über Datenbanken belegen. Er entspricht der Stanford-Vorlesung “Introduction to Database” und füllt genau eine meiner Wissenslücken. Darauf freue ich mich wirklich. Dieser läuft zwar auch über Stanford, aber über ihre eigene quelloffene Plattform namens Class2Go. Bin gespannt, wie sich Class2Go von Coursera unterscheidet.
Kein Mandat – weniger Stimmen
Leider hat es mit meiner Kandidatur bei den Grossratswahlen 2012 im Kanton Basel-Stadt nicht für ein Mandat gereicht. Ich erhielt trotzdem 1’019 Stimmen, vielen herzlichen Dank! Im Vergleich zu den Nationalratswahlen letztes Jahr ist das allerdings ein Rückgang, dort war ich bei 2’147 Stimmen.
Offensichtlich ist der Bonus durch die Piratenpartei Deutschland komplett verpufft und wir sind bei unserer Basiswählerschaft von 1.3% angelangt. Das ist mehr als die BDP und VA, wir sind also nicht unbedeutend.
SmartSpider – now and then
Durch meine Teilnahme an den Grossratswahlen Ende Oktober im Kanton Basel-Stadt bin ich natürlich auch wieder auf SmartVote unterwegs. Damit man wenigstens weiss, welche Katze im Sack man kauft, wenn man Piraten wählt.. Interessant ist der Vergleich der SmartSpiders von 2011 (Nationalratswahlen) und jetzt:
Nationalratswahlen 2011
Grossratswahlen BS 2012
Update 2. Oktober 2012:
Bei Vimentis habe ich mittlerweile auch meinen Fragebogen ausgefüllt. Der Spider ist nicht ganz deckungsgleich. Gründe dafür sind die kleinere Anzahl bei Vimentis und dass sich die Fragen bei SmartVote eher im kantonalen Kontext bewegen.
Ich war Gast beim Wahlzmorge vom Regionaljournal DRS
Am 17. September war ich zu Gast bei Gaudenz Wacker im Studio des DRS Regionaljournal in Basel. Es war mein erster Live-Auftritt und dementsprechend nervös war ich. Das allgemeine Feedback war aber durchwegs positiv, ausser dass ich zuwenig selbstbewusst wirkte. Damit kann ich leben, dies kann ich bei weiteren Gelegenheiten natürlich noch üben. So siehst übrigens das Studio aus:
Die Sendungen kann man sich hier reinpfeifen. Am Schwierigsten empfand ich übrigens die Sätze, welche ich vervollständigen musste. Da musst du wirklich politisch schlagfertig sein, was ich bei weitem noch nicht bin. Aber Spass gemacht hat es – und ich freue mich über weitere Gelegenheiten, meinen Mitmenschen zu erklären, wer die Piraten sind und was sie wollen.
Technopirate, Biologist, Digital Native, Metalhead, Software Wizard






