Monthly Archives: June 2012

Howto install gallery3 on centos6

Today I installed gallery3. I was looking for an easy way to share some pictures on my webserver and found this tool on the internet. The installation was not as easy as expected: download the .zip file. extract it to … Continue reading

Posted in Apps, Linux | 1 Comment

Howto use vi as a hex file viewer

To view file in hex mode in vi use the following commands: :%!xxd and :%!xxd -r to switch it back to normal mode.

Posted in Bash, vi | Leave a comment

Easy monitoring of an Intersystems Cache shadow server

The other day our shadow server stopped working without any visible reason. So I was looking for an easy way to monitor the server. We are using Nagios as the monitoring solution. The problem was how to get the necessary … Continue reading

Posted in Bash, Nagios | 5 Comments

Bash: How to trim a string or a variable

Sometimes you are looking for a simple way to get rid of leading or tailing spaces in a string or variable. Here’s a function I usually use in my bash scripts: function trim() { trvar=$1 trvar=”${trvar#”${trvar%%[![:space:]]*}”}” trvar=”${trvar%”${trvar##*[![:space:]]}”}” echo -n “$trvar” … Continue reading

Posted in Bash, Linux, Uncategorized | 1 Comment