Tips and Tricks

How to fake referer in Firefox

At present, there are so many free image hosting on the wild. Since these service providers usually earn income from advertisements, e.g., AdSense, the most scary thing for them is hot link. Hot link means to embedding the hosted image directly to other sites. As a result, there is no chance to display the advertisements. Most providers have to reduce hot links to decrease useless traffics by detecting referer.

3 steps after upgrading kernel in Ubuntu

Few days ago, Ubuntu 7.04 Feisty Fawn had just released the latest kernel upgrade. Since my laptop has a few proprietary kernel modules, e.g., VMware player and fglrx, I have to rebuild them immediately before continue my usual work. Anyway, this process is a kind of auto response for kernel upgrade.

How to set socket timeout in Python

BTQueue provides some functions regarding remote access, e.g., wget, wpost and scrape. Anyway, some urls are temporary or even permanent unavailable due to unpredictable reasons. It is necessary to set reasonable timeout for all operations including connect, send and receive.

How to capture webcam with audio using Mencoder

I have a webcam and my laptop is Ubuntu 7.04 Feisty Fawn. I would like to capture a movie with both video and audio using those equipments. So the tool I used should be available in Ubuntu and the one I used is Mencoder.

How to retrieve comments feed from Blogger

Since I'm writing at The Boolim Blog, I would like to read all comments too. Anyway, it is not easy to get alert for new comments in Blogger even it provides a kind of comments feed somewhere. The fact is it already provides comments feed but there is not meta element to identify what the URL is. Fortunately, I guessed and it is correct.

How to join string professionally in Python

Python provides string module for manipulating given string efficiently including string.join. On the other hand, each string object has join method to act like the separator of given strings. However, I have just found another form of the join in in Python 2.5. For example, below codes are similar.

string.join(['a','b','c'],' ')
' '.join(['a','b','c'])