Posted by joseph on March 19, 2008 ·
This an example on converting audio file from wav format to mp3 with the help of Sound eXchange( a.k.a SOX ), and Lame Aint an MP3 Encoder (a.k.a. Lame).
Before using this script, please make sure you have both sox and lame installed.
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
[...]
Posted by joseph on December 28, 2007 ·
The Exceptional Performance team from Yahoo.com identified a number of best practices for making web pages fast. The list includes 34 best practices divided into 7 categories.
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); [...]
Posted by joseph on November 6, 2007 ·
As the original version is no longer available at rightbrainnetworks.com, let me forward it here, it worths a careful read especially for LAMP administrators.
PHP is simultaneously the most infuriating and joyful languages I’ve ever worked with. I say “infuriating” primarily because the function [...]
Posted by joseph on October 19, 2007 ·
I just tried the famous shell fork() bomb on my Laptop, which is running Debian lenny. (I dare to do this because I’m going to shut down my laptop.) Please note that do NOT run it on your production server!
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) [...]
Posted by joseph on August 27, 2007 ·
In storage environment, the file system reliability is almost a common issue. As for my understanding, when a ext3 file system is under use, its integrity is keeping broken day by day, as most of the threaded applicatons cannot take fully control of data blocks. After a long time running, fsck becomes [...]
Posted by joseph on May 10, 2007 ·
Symbolic linked files are commonly used in Linux system. For example some service inital scripts are stored in /etc/init.d and linked to /etc/rc0.d, /etc/rc1.d, /etc/rc2.d, /etc/rc3.d, /etc/rc4.d, /etc/rc5.d and /etc/rc6.d, so that the system is able to control related services in different runlevel.
(function(d, [...]
Posted by joseph on January 18, 2005 ·
This is a simple python script based on some former rwhois code. It shows us an easy way on how to get detailed information about a specific IP address:
joseph@e54:~$ python ip-whois.py 94.75.214.11
====== whois.arin.net
OrgName: RIPE Network Coordination Centre
OrgID: [...]
Posted by joseph on December 8, 2004 ·
In virtualized environment, we sometimes need to generate MAC address for each virtual machine at the time of creation. Since is a nearly unlimited amount of numbers on the same subnet, it is almost impossible that we would get the same MAC address. In the follwing paragraph, we’ll show you how [...]
Posted by joseph on November 10, 2004 ·
Suppose that we have a hash like this:
my %thehash = ( "abc" => {'a', 'office', '123'},
"cax" => {'s', 'domain', '254'},
"adm" => {'s', 'atwork', '254'},
"tec" => {'s', 'domain', '294'},
"ued" => {'s', 'domain', '254'}
);
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
[...]
Posted by joseph on September 26, 2004 ·
As we know there’s a kind of read-only variables in bash in common linux system, typically $BASH_COMPLETION and $BASH_COMPLETION_DIR are both readonly variables. This post will focus on the following two topics, how can we set readonly variables in Bash, and how can we unset them.
(function(d, [...]