How to flush the postfix queue

Reading Time: < 1 minute For some reason Postfix sometimes get stuck.
To see if there are some email stuck in the queue you can simply type:

oktober# mailq
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
38A1BF3B1* 1152 Thu Feb 12 00:22:39

-- 1 Kbytes in 1 Request.

Fortunately there is a little binary called postqueue that can help.

5 Great security tools for Ubuntu

Reading Time: 3 minutes Ubuntu usually comes out of the box with a pretty good set of security features. However there are some really great tools out there that can help to save some hassle…

Closing a Thickbox

Reading Time: < 1 minute Thickbox is this great Javascript framework that helps you showing pictures or having a iframe clearly visible on your website.

For example it can be used to create a disclaimer to be displayed when entering a website.

In order to redirect your visitor to an external website if he doesn’t comply with the disclaimer requirement, or to just give access to your website, you need to close the thickbox.


Random String Function

Reading Time: < 1 minute A simple function to create a random string.

function generateString ($length = 8)
  $string = "";
  $possible = "0123456789bcdfghjkmnpqrstvwxyz";
  $i = 0;
  while ($i < $length) {
    $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);
    $string .= $char;

php imagerotate function on ubuntu hardy

Reading Time: < 1 minute Looks like many people are having problem with the function imagerotate from the gd library on php.
It also looks like the php guys have made a fork of the gd library and included a heavily customised version of it in php. Our problem is, the Ubuntu guys decided to get rid of that imagerotate and some others for security reasons. Fair enough, but how do I make it work now??

Here is how I do it on my server.