Linux

How to verify your DNS setting and its TTL

If you were unable to access this site since last weekend, please be patience. I have just moved howforge.com to the new server located at other ISP which offers higher international bandwidth because most visitors are outside Thailand. In fact, I don't like to move around too often since it might take long time for DNS to completely propagate to all ISPs around the world. That's why I post this topic. I would like to verify that my settings are correct and how long it takes to update.

How to convert MKV to AVI using MEncoder

MEncoder actually is able to decode MKV (Matroska). However, I encounter some strange problem regarding the conversion of MKV to AVI using 1 pass encoding. The error message looks like below.

Too many audio packets in the buffer: (4096 in 8255101 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.

Unfortunately, my video is not AVI files. Anyway, there is a workaround for this problem.

How to bypass web blocking using Tor and Firefox

Some day, you might find the truth that you are not alone. Someone is watching you and the same one is also trying to restrict your access to some web sites. You may notice that you are unable to visit some urls or the whole sites. In conclusion, your internet connection is monitoring and filtering to prevent visiting to some urls. Don't worry. It is possible to bypass this kind of problem easily. My trick is The Onion Router, Firefox and its extensions.

How to measure memory consumption of a program on Linux

According to the hard fight which is a comparison of Java, Python and Ruby side by side, the performance is very impressive because Python is faster than the rest. A java guru immediately identified flaws of this test in Java codes. In addition, he also improved the codes for getting faster program. However, he was too busy to perform the benchmarks again himself. I volunteered to do this task on my laptop. After preparing all codes in Java, Python and Ruby, I have to measure how long it takes to execute each code. The tool I used was "time". Everything went well until I was asked to also measure memory consumption in each case. time always gave me zero without any error message. It seems this is a bug in Linux kernel that getrusage() will return zero in all memory related values. Fortunately, I found a workaround using Python!

How to calculate MD5 in C#

Not only wget but also MD5SUM, I have been asked how to implement this functionality in C#. Again and again, I wrote below code in Mono on Ubuntu Feisty.

How to implement simple wget in C#

.NET is such a good programming environment because it provides many useful standard libraries. Actually, this concept is very similar to battery included in Python. The best part of .NET is that we have Mono so it is possible to develop .NET application on Linux to run on Windows. I have been asked to find a solution for retrieving content from specified URL using HTTP protocol in C#. Here is the code.