Wednesday, January 23rd, 2008
I never can find this information when I need it so I am writing it down:
Here are the common web banner sizes:
- Banner - 468px X 60px
- Leaderboard - 728px X 90px
- Skyscraper - 120px X 600px
- Wide Skyscraper - 160px X 600px
- Large Rectangle - 336px X 280px
- Rectangle - 300px X 250px
- Square - 250px X 250px
- Small Square - 200px X 200px
I took the name of these sizes from google as they were kind enough to name them
Monday, January 14th, 2008
Here is how to do a search and replace using Perl regex over a set of files:
perl -pi -e 's/source/destination/g' *.ext
Tuesday, January 8th, 2008
Monday, November 19th, 2007
To play MP3 files in Fedora 8 with KDE you need to add software to your default installation. This software does not come “stock” with KDE because the software is not free and RedHat is required to filter it — therefore if you download this update make sure you check the licensing agreements:
- First, add Livna sources using rpm
rpm -ivh http://rpm.livna.org/livna-release-8.rpm
- Next, Install kdemultimedia-extras-nonfree** using yum
yum install kdemultimedia-extras-nonfree
That is it, next launch Amarok as an example and hello MP3 music!

Q: Hey Chris, why does the kdemultimedia-extras package end in “-nonfree”
A: Good question, tough answer, the kdemultimedia-extras-nonfree package contains plug-ins which cannot be shipped by Red Hat / Fedora because the license is not LGPL. Please note the the license of the entire library is not LGPL! So of course you shouldn’t install it unless you pay the owners for licensing rights.
Monday, November 19th, 2007
To play MP3 files in Fedora 8 you need to add software to your default installation:
- First, add Livna sources using rpm
rpm -ivh http://rpm.livna.org/livna-release-8.rpm
- Next, Install Rhythmbox (assuming you are using Gnome) using yum
- Next, Install gstreamer-plugins-ugly** using yum
yum install gstreamer-plugins-ugly
That is it, next launch Rythmbox and hello music!

Q: Hey Chris, why does the gstreamer-plugins end in “-ugly”
A: Good question, tough answer, the GStreamer is a streaming media library which contains plug-ins which cannot be shipped in gstreamer-plugins-good because the license is not LGPL. Please note the the license of the entire library is not LGPL! So of course you shouldn’t install it unless you pay the owners for licensing rights.
Thursday, September 20th, 2007
I am in the process of building the ultimate ‘vi’ shortcut list:
- Remove Every Other Line:
:g/.*/norm jdd
Friday, August 17th, 2007
If while using ‘yum’ or ‘rpm’ you receive the following error:
rpmdb: Lock table is out of available locker entries
Your RPM dB files are screwed up… here is how you unscrew them!
This error tell you the Berkley database files which RPM uses are damaged and in order to clear the error you must rebuild the Berkley dB files from scratch.
Here is how you fix this error:
- Make a backup of your current files
- Remove the damaged files
- Rebuild your RPM Berkley dB files
- Use yum again
Here is the command walk through:
- As root, execute this:
cd /root; tar cvzf rpm-backup.tar.gz /var/lib/rpm
- Remove the Berkeley dB files which yum and rpm use:
- Instruct rpm to rebuild the databases files:
- Test your yum command again:
Thursday, August 16th, 2007
If you ever have to set an environment variable you may run into the same reality I ran into.
A simple call to system using export (as you might do on the command line)…
system( "export MYVAR=somevalue" );
…does not work!
You have to use the Perl ENV hash variable:
$ENV{'MYVAR'} = "somevalue";
Changes to $ENV{’SOMEVAR’} will be available to the current process and children processes only. Thus, if you change an environment variable for an upcoming system() call the process started due to the system() call will see the environment variable change.
Here is an example:
.
.
.
$ENV{'http_proxy'} = "192.168.0.10";
system( "wget --tries=2 --timeout=8 $url" );
.
.
.
Thursday, August 9th, 2007
Another task which hits my desk often is getting “data” out of text files. Such as names, email addresses, phone numbers, ID numbers, etc. Here is a quick way to parse or rip out “data” from a text file.
I suggest using ‘grep’ — grep is one of those applications which is more powerful than the casual user realizes. And let’s face it, if you use or know what grep is you probably do not consider yourself a casual user.
grep -o -P "[regex_pattern]" [filename]
The -o tells grep to only output what it matched in your pattern where your [regex_pattern] is your pattern.
The -P tells grep to use Perl Regular Expressions
Wednesday, August 8th, 2007
To play MP3 files in Fedora 7 you need to add software to your default installation:
- First, add Livna sources using rpm
rpm -ivh http://rpm.livna.org/livna-release-6.rpm
- Next, Install Rhythmbox using yum
- Next, Install gstreamer-plugins-ugly** using yum
yum install gstreamer-plugins-ugly
That is it, next launch Rythmbox and hello music!

Q: Hey Chris, why does the gstreamer-plugins end in “-ugly”
A: Good question, tough answer, the GStreamer is a streaming media library which contains plug-ins which cannot be shipped in gstreamer-plugins-good because the license is not LGPL. Please note the the license of the entire library is not LGPL! So of course you shouldn’t install it unless you pay the owners for licensing rights.