To make partitions larger than 2TB, a normal DOS partition table will not work. We have to use a GPT partition table to support +2TB partitions. This is easily done with the parted tool. Below we label the /dev/sdb device…
Why Nagios plugin check_dig fails on one host and works on another
It turns out that language/locale settings affects the output of the check_dig Nagios plugin. On one Nagios server it worked as supposed, but on another it threw; DNS WARNING – 0,004 seconds response time (dig returned an error status) Performance…
Installing Groovy and Grails on OSX
Download the latest versions of Groovy & Grails. Currently that is groovy-binary-2.0.1.zip and grails-2.1.0.zip. Let’s unzip these archives into /usr/share; cd /usr/share sudo unzip ~/Downloads/groovy-binary-2.0.1.zip sudo unzip ~/Downloads/grails-2.1.0.zip Next we setup environments variables, which points to these paths. Adding these…
Forcing HTTPS for php scripts
Ever wanted to enforce HTTPS access to particular scripts or files? Here’s one way to do it. The following Apache example rewrites URL to HTTPS for .html, .htm, and .php files. <IfModule mod_rewrite.c> <FilesMatch “\.(htm|html|php)$”> RewriteEngine On RewriteCond %{HTTPS} off…
SATA vs. SSD
A MySQL server running on Ubuntu 10.04. First graph is a SATA disk, and the second is an Intel SSD. Remember to mount SSD partitions with the discard option for TRIM’ing support. (available in 2.6.33+ kernels).
Handbrake 0.9.5 for OSX PowerPC
There is no official ppc build of Handbrake 0.9.5. Following the wiki compile guide, it is possible for compile it on your own ppc box. Or if you are to lazy, you are welcome to download the ppc binaries I…
My first Python script
I have always avoided Python. I am not sure why, but I think it is mostly because of the syntax, with the needed indention. Well, today I wrote my first script, and I actually like the language a little. I…
Top 50 Programming quotes of all time
Hah, there are some funny quotes here, I especially like this one “Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not…
Postfix reject_unknown_helo_hostname woes
Googling for some answers regarding why some mail-servers fail to identify themselves correctly, I found this amusing forum reply; Unfortunately, “reject_unknown_helo_hostname” is not acceptable to use, because too many Exchange Servers are configured to identify themselves with something that only…
Bootable Software RAID-1 on running system
This is tested on Debian Squeeze, but should work on most Debian derived distributions and on other Linux distributions with small changes. I have written almost the same guide some years ago, but I wanted to add an extra disk…