Author Archives: Thomas Cokelaer

AWK: the substr command to select a substring

Under Linux, the awk command has quite a few useful functions. One of them, which is called substr, can be used to select a substring from the input. Here is its syntax: substr(s, a, b) : it returns b number … Continue reading

Posted in Linux | Tagged | 12 Comments

Python: string substitution using dictionaries

A nice way to populate a string with values is to use a dictionary, which can be defined outside of the print statement. The standard way is to write >>> print "The temperature in %s is %f degrees" % (’celsius’, … Continue reading

Posted in Python | Tagged | 1 Comment

How to install a local WordPress (Linux Ubuntu)

This blog (in French) provides an article that explain how to install a local version of WordPress (Linux Ubuntu) (Le Blog de Lise).

Posted in Computer Science, Linux | Tagged | Leave a comment

SED: how to add a line at the top of files

Imagine, you have a set of ReST files, and you want to add the statement “author: your name” at the top of each of them. First, identify the files you want to edit and pipe them to sed: ls *.rst … Continue reading

Posted in Linux | Tagged | Leave a comment

Missing package in rpy2 (ggplot2)

When using rpy2, the python implementation of R, I quickly came up with the issue of having missing packages (e.g., ggplot2) With a fresh installation of rpy2 (and R-core), if you type the following code in your python shell: from … Continue reading

Posted in Computer Science | Tagged , | 3 Comments

Fedora: how to add a sudo user (and avoid password)

How to add a user in the sudo list If you need to type commands using sudo, you will soon be tired to enter the sudo password again and again. Here are the steps to add a user in the … Continue reading

Posted in Linux | Tagged , | 3 Comments

Fedora yum update fails

Sometimes, when you want to update your Fedora packages with : yum update the process fails with an error message similar to: Error: Cannot retrieve repository metadata (repomd.xml) for repository: rpmfusion-free-updates. Please verify its path and try again The first … Continue reading

Posted in Linux | Tagged , | Leave a comment

Fedora 14, slow wireless

I’ve recently posted a link related to Slow network under Fedora 14 distribution. The solution provided is related to iptables and is still working (on my distribution at least). However, I’ve also noticed that the wireless remains very slow while … Continue reading

Posted in Linux | Tagged , | Leave a comment

Books: Snow, Orhan Pamuk

I’ve read Snow last year, a novel from Orhan Pamuk, a Turkish novelist, Nobel prize in Literature 2006. For an overview you can consult wikipedia entries in French (Neige) or English (Snow).

Posted in Uncategorized | Tagged | Leave a comment

How to create an ISO image from a Folder (linux)

Under Linux, you can create an ISO image from a folder using a command line argument with the mkisofs tools. The following example creates an ISO image suitable to be used under Windows: mkisofs -J -l -R -V “Label CD” … Continue reading

Posted in Linux | Tagged | 1 Comment