How to fix corrupt partition table

Have you ever seen 80 GB free space in 15 GB hard disk drive? I have just seen in my very old hard drive. I would like to install Ubuntu 5.10 into this drive. Unfortunately, the process always hangs during formatting. I also tried to use only first 15 GB with no luck. My thought is there might be something wrong in the partition table and I have to clear them all. Fortunately, Ubuntu comes with lots of hard disk utilities such as fdisk, cfdisk, sfdisk, parted, and hdparm.

First of all, I tried to see its cylinder, head, and sector recognized by BIOS and kernel. hdparm -i and hdparm -I shown that raw information and current information are different. Something wrong here. So I should make partition table with the correct information. parted and fdisk are not useful for this situation. Instead, I have to use cfdisk or sfdisk which allows me to override cylinder, head, and sector by the correct ones.

วิธีง่ายๆ ในการใช้งาน vim syntax color

บางครั้งคุณอาจจะรู้สึกเบื่อหน่ายในการแก้ code บางอย่างใน terminal ของ *nix หรือ linux เนื่องจากมันไม่มีสีแยกแยะให้แก้ไขได้ง่ายๆ ดังนั้นเรามาลองทำกันไหม ว่ามันทำได้อย่างไรบ้าง (ขออ้างอิงจาก linux เป็นหลัก และบาง distro เท่านั้น ในที่นี้ขออ้างอิงจาก centos ในเรื่องของ pkg)

Ruby and BitTorrent

As of today, we know what BitTorrent is and how to use it. The original implementation of BitTorrent has been written in Python by Bram Cohen. From the BitTorrent, Python is now one of well-known language wider. Thanks! The original implementation then has been modified and extended to support more sophisticate features and some of them are so popular right now, e.g., ABC and BitTornado. Then Java, C, C++, and C# have been used to implement in different ways, e.g., Azureus, libbt, BitComet, uTorrent, and etc. Where is Ruby?

Comparison of ruby and python line by line (3/3)

This post is the last part of this comparison. I am going to demonstrate how to develop XML-RPC server and client in Ruby and Python. As I said earlier, I don’t know much about Ruby. Below ruby codes are based on an article in Linux Journal #144. I just tried to develop similar program in Python. There are 2 parts; server and client. Let me start from the server.

Libjingle 0.3.0

Voice over IP, VoIP, is a trend for very near future. There are so many VoIP standards but the key component for developing a VoIP application is the voice codec. Standard voice codecs are not as good as acceptable comparing to telephone quality. Most of good and great codecs are patented. Fortunately,  gives high-quality GIPS from Global IP Sound to all of us free of charge. Though, if you concern about licensing, Libjingle 0.3.0  the high-quality GIPS or GIPS Voice Engine Lite which is totally free.

Comparison of ruby and python line by line (2/3)

In the first part of this series, you see how ruby and python retrieve data from given URL and then parse the results using regular expression. In part two, the code is extended to query prices from  through .

  1. Specify executable
    Ruby
    #!/usr/bin/ruby
    Python
    #!/usr/bin/python
  2. Import modules
    Ruby
    require ’net/http’