Monthly Archives: May 2011

Skype video missing under linux

In principle in the options->advanced section you should have a section called video devices If not, then quit Skype, and create this environmental variable export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.soexport LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so Restart Skype and go to options->advanced->video devices that should be available now. Tested … Continue reading

Posted in Linux | Tagged , | Leave a comment

What is Virtualenv

Virtualenv is a tool to create isolated Python environments. Its usage could be very useful when dependencies and versions are tricky. Imagine you have an application that needs version 1 of a library, but another application requires version 2. If … Continue reading

Posted in Python | Tagged , | Leave a comment

Mount an ISO file under linux with bchunk

The tool bchunk can be used to mount an ISO file. Under Fedora 9, you could use it as follows. First, you need to install it: yum install bchunkyum install bchunk bchunk converts a .cue (and its pair-wise .bin) file … Continue reading

Posted in Linux | Tagged , | Leave a comment

Combine AWK and SED to create symbolic links

The unix tools AWK and SED are very powerful tools to manipulate files and perform text processing tasks. It’s true that the syntax is not always very intuitive but it can help you in performing task in a single line. … Continue reading

Posted in Linux | Tagged , | 1 Comment

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