JavaScript: Event Registration

This article was first written in May 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/255).

Description

Attach an event to an element by defining the type of event to listen for, the handler function to execute when the event is fired, and whether you want to use event capture.

Code

/* Author: Scott Andrew LePera (www.scottandrew.com)
Default value for useCapture has been set to false because: "If it is true,
the event listener should not fire for any element the event listener is
registered on." */
function addEvent(obj,evType

HOWTO Fully Install PostgreSQL on Debian

This article was first written in March 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/218).
This is a short tutorial on how to fully install PostgreSQL (with ready-to-use user accounts and test table) on a simple Debian installation. When not specified otherwise by the command line prefix or by a full statement, you are supposed to have root permissions.

The packages

To install the PostgreSQL base system as well as a textual client, you need to issue the following command
apt-get install postgresql postgresql-client
This will ins

Rsyncable gzip

This article was first written in February 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/206).

GZIP="--rsyncable" tar zcvf toto.tar.gz /toto
Why do you need this special option ? Because if you compress your files before synchronising them with rsync, a very small change in one original file may force rsync to re-transmit the whole compressed tar.gz file, instead of just the changed portion. The basic reason is that rsync works at the byte level : very roughly, it compares the old copy of the file with the latest source, and transmits every by

Bash error message: {bad interpreter: No such file or directory}

This article was first written in February 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/203).
If you encounter the following error while trying to execute a shell script with Bash, it is probably a carriage return problem: bad interpreter: No such file or directory To fix it, see HOWTO Convert carriage returns between UNIX and DOS on Debian.

HOWTO Convert carriage returns between UNIX and DOS on Debian

This article was first written in February 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/203).
The convert carriage returns between UNIX- and DOS-kind of CR, use the tools dos2unix and unix2dos from the sysutils package. Usage is really simple:
$ dos2unix filename
or
$ unix2dos filename
where filename is the name of the file to convert. To convert a hierarchy of files starting from current directory:
$ find . -type f -exec dos2unix {} ;
For more information see the manpages.

HOWTO Add journalization on a filesystem in Solaris

This article was first written in January 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/202).
Solaris supports journalization (aka logging) on UFS filesystems which allows for shorter reboot times after a crash. To activate it, it is really simple: Go edit /etc/vfstab and add the term logging in the last column (mount options) for the UFS filesystems you want.

HOWTO Speedup your Debian GNU/Linux

This article was first written in January 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/195).
Warning: This article is still work in progress. You have to keep in mind that speed is somewhat relative. It is often just a question of personal feeling, especially for a desktop machine. There are many ways to speed your Linux installation. Here, we will show how to do it on Debian Sarge+, but most tips should also improve performances on other distributions. We will focus on a desktop install.

HOWTO Install Debian Sarge on an AOpen 1557 GLS

This article was first written in December 2004 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/194).

Introduction

All in all, the basic Debian Sarge install (using Netinst CD) does a lot of work and the laptop is usable as is (network, graphical display, sound, …). However, some things need a bit of tuning to get the best of your laptop. This article is intended to help those people who want to get the best out of it or, so to speak, to make everything work.