Logs

These logs are random snippets of information that have been useful to me in the past. Hopefully they help you too!


Log Message

Note to self: when you get time, figure out how to do logging, as a general practice: here is a nice link to get you started.

Link for Python logging

Note to self: when you get time, figure out how to do logging, as a general practice: here is a nice link to get you started.

Debugging python deadlocks

Sometimes, a python script just gives up and hangs. Even Ctrl-C does not exit the program. You do not have to have a loop with a catch-all except command or ...

Export syntax-highlighted pdf files from vim

If you want to export from vim to a pdf file with syntax highlighting, hardcopy does not seem to use the correct syntax highlighting file. Or rather, it uses...

Making vim display italicised text

To make vim display italicised text, see this wonderful blog entry. Essentially, we need to manually map the escape sequences to the keywords sitm and ritm, ...

Extending Python using C

For an introduction to extending python using C, via PyObject and the like, take a look at this tutorial.

Which which is which

The which program used by Fedora/CentOS/RHEL is far more advanced than that used by Debian/Ubuntu. Get the Fedora version here. I have also created an alias ...

Get ls to sort by file extension

Get ls to sort by file extension using ls -X. I have added this to .bashrc so this is now the default. If you want the usual directory listing, for instance ...

Short tutorial on screen

Take a look at this for a nice, short tutorial on screen. Be warned: screen and my shortcuts in vim do not seem to interact very well.

Place pdf pages side-by-side in linux

To convert a pdf document into one containing two pages per side, simply man pdfnup. This is a convenient frontend to the more complex pdfjam. For most purpo...