Blogs

วิธีง่ายๆ ในการใช้งาน 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’  

Find old files using find, du and awk

My friend provides a shared disk space among trusted friends. Everybody are allowed to upload files to and download files from this space. The problem is that free space run out so fast. I have to help him identify oldest files to remove. If you are on *nix-based operating system, you might know about "find", "du" and "awk". To simplify this tip, I will demonstrate how to use find effectively.

  • You want to find files modified exactly 7 days ago.
    find . -ctime 7
  • You want to find files modified 7 days ago or older.
    find . -ctime +7