Commandline tips

February 20th, 2009 No comments

Do you think you know all great commands on the command-line? Then you have to take a look at this site. It’s a overview of the most used and most popular commands for linux.

Categories: Linux, Websites Tags: , ,

pgFouine PostgreSQL log analyzer

February 11th, 2009 No comments

If you have a busy PostgreSQL database you may want to know which query takes up most of the time of the postmaster. To create a nice overview of slowest and most frequent queries you can use pgFouine.
This PHP script can parse a PostgreSQL log and create different reports.

The command I usually use:

./pgfouine.php -from "- 1 week" -memorylimit 512 -file <logfile.log>
-logtype stderr -title 'PostgreSQL analyze' -report db-report.html=
n-mostfrequenterrors -format html-with-graphs

Resize and auto orientate pictures

February 9th, 2009 No comments

If you have a linux system with ImageMagick, you can easily resize and auto orientate pictures with a bash script.

Just create a file called with the following content:

list=`find $path*`

for file in $list; do
        echo $file
        convert -auto-orient -resize $size $file $file
exit 0

And give it execute rights.
When you call “./ 1024 /home/user/pictures/” every picture in /home/user/pictures will be auto-orientated and scaled to a max height or width of 1024 pixels. The auto-orientate is done by looking at the exif info.

Open source alternatives

February 9th, 2009 No comments

Looking for alternatives for Photoshop, Word, Excel, Visio etc? Try this website. You can search for commercial applications and find open source alternatives.

Developing on Ubuntu

February 9th, 2009 No comments

On my work I use a HP laptop with Ubuntu Intrepid. With Ubuntu and some nice applications you have a good platform for developing (web) applications.

These are the applications I use:

  • Firefox – Of course for surfing the internet, and with plugins like Firebug very useful for debugging javascript .
  • Thunderbird – My default mail client
  • Evolution – For access to my work calendar
  • KeePassX – ForĀ  storing passwords
  • Charles – A web debugging proxy
  • Geany – A fast text editor with a IDE
  • Meld Diff viewer – A diff and merge tool
  • RapidSVN – Front-end for subversion
  • Zend Studio – My most used IDE
  • Avidemux – A simple video editor with support for many codecs
  • Truecrypt – For securing important files
  • Dropbox – Used for the keepassx database, making it available on all my computers
  • VirtualBox – Running a Windows XP environment for testing with IE and using Visio (didn’t found a good alternative yet)

HP support pack on CentOS

February 7th, 2009 No comments

If you have CentOS running on a HP server you can install the HP support pack. On the HP site download the Redhat version.

First of all you need some rpm packages, this should be enough:

yum install rpm-build rpm-devel net-snmp glib kernel-devel
compat-libstdc++-296 make gcc

Than you have to edit the /etc/redhat-release file. First make a backup of the original file. Than place the following line in it:

Red Hat Enterprise Linux ES release 5

The version number must match the CentOS version, in my case this was CentOS 5.2.
After this you can easily start the installation by typing: ./install<versie>.sh -nui.

Extend a ext3 volume with LVM

February 7th, 2009 2 comments

If you have a ext3 volume on LVM you can easily change this volume.

When you want to extend a volume you can do this with lvextend.
To extend a volume with 10GB do the following:

[[email protected] ~]# lvextend -L+10G /dev/<volgroup>/<volume>
Extending logical volume <volume> to 14.88 GB
Logical volume <volume> successfully resized

After this you have to extend/resize the filesystem:

[[email protected] ~]# resize2fs /dev/<volgroup>/<volume>
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/VolGroup00/os is mounted on /; on-line resizing required
Performing an on-line resize of /dev/VolGroup00/os to 3899392 (4k) blocks.
The filesystem on /dev/VolGroup00/os is now 3899392 blocks long.

That’s all!
You can do this without any problems on a live root file system.

RssOnline news feeds

February 7th, 2009 No comments

This dutch site has a great overview of all popular dutch news and blog RSS feeds. It reads the feeds and shows the latest additions.

Categories: Websites Tags: , , , ,

Less logging from snmpd

February 7th, 2009 No comments

The snmp deamon logs a lot to the syslog deamon on CentOS. Especially when you have some monitoring with the snmp protocol.

You can change this by editing the init options of snmpd. This options can be found in /etc/init.d/snmpd. Search for the rule starting with “OPTIONS=”


OPTIONS="-Ls d -Lf /dev/null -p /var/run/ -a"

You have to change this to:

OPTIONS="-LS 0-4 d -Lf /dev/null -p /var/run/ -a"

This says that you want to log everything with a priority above debug to the syslog deamon.

In CentOS and other Redhat distro’s you also can create a file /etc/snmp/snmpd.options and put the options line there.


February 7th, 2009 No comments

A online storage service with nice clients for Windows, Apple and Linux. And a very neat webinterface!

2GB storage for free, 50GB for 99,- dollar per year.

Categories: Websites Tags: , , ,