Generate CSR for apache with mod_ssl

This post is just as a reminder so i can look this up when i need to.. But if it helps you that’s great.

To generate a 2048 bits certificate request do this:

openssl genrsa -out 2048
openssl req -new -key -out

In the vhost add this:

SSLCertificateFile /where/ever/
SSLCertificateKeyFile /where/ever/

When a intermediate CA is needed, download it, and add this line:

SSLCACertificateFile /where/ever/

No Comments »

Must have Mac OSX App: TotalFinder

The Finder is the worst thing on the mac if you ask me, there are several missing features for example the abilty tho show folders before files, show hidden files, no creation of those irritating .DS_Store files etc.

TotalFinder, from BinaryAge, does everything i miss in the default mac finder. A few features i like the most are:

  • Tabbed browsing
  • Side-by-side mode, 2 finders in one window
  • Show hidden/system files
  • Folders on top

Go to the TotalFinder website

No Comments »

Textmate command: url-safe

Transforms each line in you text file to an url-safe line. I use this for example to transform product names to url-safe names which i can use in a webshop.

$stdin = file_get_contents("php://stdin");

$lines = split("\n", $stdin);
$newlines = array();
foreach($lines as $line) {
$line = strtolower($line);
$line = preg_replace("/\s+/","-",$line);
$line = preg_replace("/[^a-z0-9_\-]/","",$line);
$newlines[] = $line;

echo join("\n", $newlines);


No Comments »

Textmate command: sort

$stdin = file_get_contents("php://stdin");
$lines = split("\n", $stdin);
echo implode("\n", $lines);

No Comments »

Textmate command: lowercase

$stdin = file_get_contents("php://stdin");
echo strtolower($stdin);

No Comments »

The best editor on mac osx #textmate create your own commands using PHP

With the bundle editor it’s possible to create your own commands. And the best thing ever is you can use PHP in your commands.

Now i can do virtually anything, advanced text conversions, even with database lookups!

Textmate PHP command

No Comments »

Update Linksys WRT54GR firmware problem

I had a problem with updating the firmware of my Linksys WRT54GR from 1.04 to 1.18.
I got some kind of connection timeout when i pressed the “Start to upgrade” button. I tried all browsers, IE7, IE8, Firefox, Safari, Chrome on Windows and Mac.
Nothing worked..

After some googling around i found out that it only works when you use Internet Explorer 6!! OMFG… what a crappy router… They should hang the developer who wrote the 1.04 firmware..

Well, i installed IEtester, which you can find here, and it worked!!


Use wget in cron with no output

When you use wget in a cron to run a php script at a specific interval the home directory of the user this cron is running as is filled with files containing the output.
You can make cron output everything to stdout to make this stop:

/usr/bin/wget -O - -q

No Comments »

Set network interface to 100 mbit full duplex (eth0) in CentOS

Add this line to /etc/sysconfig/networking/devices/ifcfg-eth0
(or any other nic if you need to)

ETHTOOL_OPTS=”autoneg off speed 100 duplex full”

Make sure your switch also has this configured this way.

No Comments »

Redirect naar primaire domein met .htaccess

Als je bijvoorbeeld een .com en .nl domein hebt gekoppeld hebt aan een hostingsaccount wil je dat men (en google) altijd naar het primaire domein wordt doorverwezen. In dit voorbeeld wordt de .com naar de .nl geredirect.

RewriteEngine On
RewriteCond %{HTTP_HOST} [NC]
RewriteRule ^(.*)$$1 [L,R=301]

No Comments »

« Prev - Next »