Category Archives: Programming

Symbian: iCode for ‘Enter’ and ‘c’ keys on Nokia phones.

The following won’t make sense to most of the people reading my blog. However, hopefully, it will help out fellow Symbian developers from pulling off their remaining hair looking for the solution I break out in the space of this post.
Nokia phones have a ‘c‘ key which mostly deletes selected items or text. [...]

Paste Mode: Pasting text (and indenting it) in Vim

Pasting a block of code copied from elsewhere in Vim is a nightmare, unless you know how to do it right. The autoindent (and, possibly, smartindent) features of Vim go crazy when you yank and slap a block of text. How do you do it right, then? This is not a new [...]

Mid-week nightly Perl useless magic and fun!

Last night, I was sitting at my desk, watching text scroll by across an IRC session open in a terminal screen set in black, when my eyes came to halt at Pixelized on ##slackware on FreeNode soliciting help with a particular use of grep. To cut the rather overly technical story short, what Pixelized [...]

Unquote HTML-quoted strings in Python

I wasted a lot of time looking for something in Python to decode (if that is the right word, otherwise, unquote) HTML-quoted strings such as those you get back as form values. Despite using the module “urllib“ to retrieve the form values in the first place, I was not aware of the set of [...]

SVN: Relocating repository URLs with svn switch –relocate

You are using subversion (svn) for version control for a web-based software project you are doing. Your svn server is hosted on your laptop behind a DSL with a dynamically allocated IP address. You checkout the head revision on a live server one day, make changes in a few files on the server, [...]

Uploading files via newforms in Django made easy.

I have already described creating custom fields with Django and shown how easy it can get. Today, I am going to show how to manage file uploading through newforms. I expended a good part of my morning and afternoon today reading up on Django and asking for help in #django on irc.freenode.net. [...]

Creating custom fields using Django’s newforms Framework

I simply adore Django’s newforms framework. Creating HTML forms and processing them, both of which, as any web developer would love to tell you with a grimace on their face, are extremely tedious and monotonous tasks, have never been easier with Django.
Part of the reason I like it is that each field in the [...]

Serial Port Communication on Slackware using PySerial

PySerial makes it awfully easy to interact with the serial port using Python. I am going to quickly demonstrate how to use PySerial on Slackware.
Before doing anything, ensure that serial port interrupt is enabled in BIOS. In other words, ensure serial port in not disabled. Source /etc/rc.d/rc.serial to initialise serial port(s) on [...]

taglist - Source code browser plugin for Vim

Tili drew my attention to “taglist” — a source code browser plugin for Vim. Yes! It is a neat thing to have if you plow through large source files in Vim. The source code browser it makes available is pretty bland and a far cry from source code browsers available in full-feature [...]

Hex escape strings in Python: Shellcodes

Those of you who write proof of concept exploit code in Python might have run into trouble trying to interpolate some hex value in between NOP sleds in Python. Consider the following code as an example:
code = “%X” % (130 + length(var), )
shellcode = ‘\x00\x00\x00\x00′ + ‘\x%s’ + ‘\x00\x00′ % (code, )
Python won’t let [...]