Month: June 2007

Replace \n with another String

The command to convert all \n in a file to another string – very useful for list code generation. perl…

Remove Extension in Shell Scripting

This command will list all the files a folder without their extensions. Comes handy when doing shell scripting perl -e…

HTTP Digest Authentication with PHP

The code for using HTTP Digest Authentication with PHP. <?php realm = ‘Restricted area’; if (empty(_SERVER[‘PHP_AUTH_DIGEST’])) { header(‘HTTP/1.1 401 Unauthorized’);…

Find Element’s Position using JavaScript

Find the position of an element using javascript function findPos(obj) { var curleft = curtop = 0; if (obj.offsetParent) {…