This blog has moved! Redirecting...
You should be automatically redirected. If not, visit and update your bookmarks.

Tuesday, May 22, 2007

Named Pipes (FIFOs)

A named pipe is a special kind of file on *nix systems that can be used for inter-process communication. They behave like FIFOs and are created using the command "mkfifo":

$ mkfifo mypipe
$ ls -l mypipe
prw-rw-r-- 1 xxx xxx 0 May 22 10:18 mypipe

The "p" in the attributes list indicates that this is indeed a pipe.

A trivial example of its use may be to redirect the output of a command on a remote server to a pipe and then reading from that pipe from another host via ssh.

Tuesday, May 15, 2007

Software Keyboard and Mouse (KM) Switcher

Stumbled across this great tool a few days ago:


Description from the project homepage:

Synergy lets you easily share a single mouse and keyboard between multiple computers with different operating systems, each with its own display, without special hardware. It's intended for users with multiple computers on their desk since each system uses its own monitor(s).

Redirecting the mouse and keyboard is as simple as moving the mouse off the edge of your screen. Synergy also merges the clipboards of all the systems into one, allowing cut-and-paste between systems. Furthermore, it synchronizes screen savers so they all start and stop together and, if screen locking is enabled, only one screen requires a password to unlock them all.

Tuesday, May 08, 2007

Mass conversion of images

The following "one-liner" can be used to mass convert a given image format into another using the convert (part of ImageMagick) and basename tools:

$ for A in $(ls *.$SRC_TYPE); do convert $A $(basename $A .$SRC_TYPE).$DST_TYPE; done

where $SRC_TYPE is the file suffix of the original images (e.g. png) and $DST_TYPE is the file suffix of the type desired (e.g. eps).