*NIX

Resize video using Mencoder

Mencoder has many video filter and scale is one of them.

mencoder input.avi \
         -vf scale=64:-2 \
         -ovc lavc \
         -oac lavc \
         -ac mp3 \
         -o output.3gp

Tags: ,

How to transfer file using netcat

Destination:

nc -l -p 10000 | tar xvf -

Source:

tar cvf - data/ | nc 172.16.137.133 10000

Tags:

How to change max open files limit in Linux

By default, each user is limited maximum number of open files to 1024. Sometimes this value might be insufficient, e.g., you are running peer-to-peer applications on the host. If you want to see the current value, run ulimit -n or ulimit -a to see all limits. Anyway, you should get error messages as follow whenever the limit is not enough.

Too many open files

How to install MySQL server 4.1 on Ubuntu Edgy

In Ubuntu Edgy Eft, the default repository only have mysql-server-5.0 since it is the lastest stable version. However, in some rare cases where existings codes are relying on MySQL 4.1, it is eaiser to install MySQL 4.1 to minimize the effect on the codes. Below is what I did.

How to bind directory in Linux

Have you ever been getting problem regarding chroot aka Change Root? Change root is a great solution to create a jail for such a process, users or services to maximize level of security concern. The most common usage of Change Root is for FTP server. However, it is not perfect in some cases. For example, you are going to provide a file server for mirroring through FTP. Unfortunately, you don't have SAN or NAS to serve large storage, says 1 TB or more, on a single directory (a partition). There are several solutions, e.g., parallel file system and friends. Another solution with less complexity is to bind directory locally.

How to setup Xserver for i810-based WXGA on Projector

It has been so long since I upgraded my laptop to Ubuntu Edgy Eft and dual screen does not work properly anymore. I tried several techniques but all failed. Anyway, I have just found a new hope in Gentoo Howto. By some modification the given xorg.conf in the howto, the dual screen works again.