Javascript parent constructor being run when defining inheritance and a solution
No Comments

Posted by Drakonen on January 23, 2012 in Uncategorized | Short Link

When using the traditional Javascript methods to do some sort of inheritance, the constructor of the parent will always be run when trying to inherit it. This seems to be a unfortunate side effect of using new a(). The problem Consider this code. Here b inherits from a function a() { console.log("a"); }   function [...]

Using hgtools with mercurial tags to automatically version packages
No Comments

Posted by Drakonen on January 22, 2012 in Uncategorized | Short Link

I liked to automate my python package versioning a bit more and did this with hgtools. With hgtools it is quite easy to store the version numbers only in your repository as tags, and not having it again in setup.py. A minimal setup.py can look like this: from setuptools import setup, find_packages setup( name="HelloWorld", use_hg_version=True, [...]

Django class based views and testing them
1 Comment

Posted by Drakonen on October 5, 2010 in Uncategorized | Short Link

One of the problems described well by Honza Král’s presentation on Djangocon.eu 2010, is how to test properly and make it easier. In his presentation he touches on using class based views instead of using normal functions (around 14:14 in the link video). This is not as straight forwards as it seems at first. There are [...]

Vim, python pep8 and pylint.
2 Comments

Posted by Drakonen on April 13, 2010 in Uncategorized | Short Link

When you are making your Python code pep8 conformant or want to have a good pylint score and you are using vim, there are a few ways to make it easier and faster. First you need to know a bit about the vim option -q. -q takes a filename as a argument, and vim then [...]

Configuring the Buffalo AP’s as a Bridge
No Comments

Posted by Drakonen on May 5, 2009 in Uncategorized | Short Link

Configuring the Buffalo WHR-HP-54G as a bridge is quite easy, given that you can get Tomato firmware on there. The default Buffalo firmware doesn’t support bridging or, I couldn’t find it. only thing I found was WDS bridging which is not what I want. Install Tomato You need to install an alternative firmware, fortunately most [...]

Setting up Suse LTSP with DHCP on another server
No Comments

Posted by Drakonen on April 16, 2009 in Uncategorized | Short Link

At work, I have been tasked with setting up a Linux terminal server to lighten the load of our exsisting Windows server. LTSP (Linux Terminal Server Project) is quite a nice piece of software. It makes good use of PXE netbooting, but it should also work with RDP. Get Suse Download the openSUSE-Edu-KIWI-LTSP-live-unstable.i686 iso from [...]

The G1 Experience
2 Comments

Posted by Drakonen on January 27, 2009 in Uncategorized | Short Link

Yesterday when I got home there was a nice present waiting for me. My G1 Phone arrived! I ripped open the packaging and found a phone that was smaller than I expected from the images from the internet. First tries Popping in the sim card and the battery was easy, turning it on was a [...]

Wichteln, aka, random christmas presents!
No Comments

Posted by Drakonen on December 5, 2008 in Uncategorized | Short Link

Why i hate the apple mighty mouse
2 Comments

Posted by Drakonen on October 10, 2008 in Uncategorized | Short Link

I’ve been explaining myself a lot lately for my deep hate for the apple mighty mouse, so here is are a few points on why i hate it. Scroll wheel gets dirty and is hard to clean I have never had a mouse with a scrollwheel before where the wheel needed cleaning. Apple doesnt give [...]

Default paramater values with python
2 Comments

Posted by Drakonen on September 26, 2008 in Uncategorized | Short Link

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 [...]

Copyright © 2005-2012 Draakwired All rights reserved.
The Shades theme, version 1.7, is a BuyNowShop.com creation.

Social links powered by Ecreative Internet Marketing