Posts by Drakonen:
Default paramater values with python
2 Comments
Default argument values for functions are a nice shortcut in python. They save you from writing many wrapper functions and make the code more readable and also easier to use. They can be used wrong though: >>> def foo(a=[]): … a.append(‘bar’) … return a … >>> foo() ['bar'] >>> foo() ['bar', 'bar'] Like described in [...]
Removing the link boxes from Latex’ Hyperref (and color)
Aah Latex… A love hate relation ship. Working on my thesis I use the hyperref package for some nice linking support in my document. unfortunately this also causes them to get link boxes around them. Here’s the code to remove them: \usepackage[pdftex]{hyperref} \hypersetup{ colorlinks,% citecolor=black,% filecolor=black,% linkcolor=black,% urlcolor=black } EDIT: Hyperref seems to offer this [...]
HAR inspired Python Pygame fun
I have always wanted to do some stuff with Pygame. When i saw the logo on the HAR2009 wiki I whipped up a little python program that draws squares and fades between colors. It looks pretty cool! Needed: Python, Pygame Downloads: har_squares [edit]Seems i have uploaded the wrong file… My apologies to the original writer. [...]
Drakonen.com
Finally i had the impulse to buy my own domain: drakonen.com. I ‘moved’ my blog to this domain which took a simple symlink. Making Nginx do a moved permanently redirect was a bit harder though, and caused quite some frustration. But here it is: server { server_name drakonen.digigen.nl; if ($http_host = ‘drakonen.digigen.nl’ ) { rewrite [...]
Vim remap ex-mode key
I’ve become in the habit to miss shift-a in vim (edit at end of line), and instead pressing shift-q which brings you to the ex-mode. To get out of that, you need to type the command “visual“. Quite long and annoying. Quick look at the help pointed me to the vimrc_example.vim (:help vimrc_example.vim). And this [...]
Having fun with IRC daemons
Sooo.. after a talk with my boss, I decided to implement one of the things he once did. An IRC server module which on connect gives you a random 3L1t3 hackers handle. 1245 -!- Code-dUde [] has joined #darkwired 1245 -!- fast-Fate [] has joined #darkwired 1245 -!- wet-chillA [] has joined #darkwired 1245 -!- [...]
New IRC daemon
Today I switched the IRC Daemon on darkwired. From old unreal to the shiny new inspircd. Inspircd is pretty easy to configure although it is a pretty big config, it is quite easy to understand and it did not take long to get it up and running. Big plus on that one! Ofcourse no first [...]
Germans and my Name
Germans are used to Johann I guess… But alas, my name is still Johan without the second n.
Violation
I am in violation of german law: http://kismac.de/
My German phone number
Keeping up with the one post per month… I present: My new German Mobile phone number! 0049 17696209986 Still using my old P900 for this. My dutch number is out of service until I find a good phone for it. (switching Sim’s once in a while) using a way back old phone for my dutch [...]