sugree's blog

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 Cookie.py in Python 2.5. For example, below codes are similar.

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

How to sniff TCP connection in Linux

Today I have to investigate network related problem that caused some networks were usable for a moment. This problem was occurring at remote site so I didn't have physical access to anything. What I have is just an account on the Linux router for the NAT network in training room. The application relies on web services technology so it is absolutely pure TCP. There are so many problem regarding this investigation. The coordinator don't understand the lower level of network so I can't ask too much information. Actually, I have to try by myself. At a glance, I would like to know if the connection from the client to the web services container is success or not. So I need to have a kind of sniffer.