Error message

Deprecated function: Function create_function() is deprecated in GeSHi->_optimize_regexp_list_tokens_to_string() (line 4736 of /home/sites/site100029201/web/

Mac In A Box

Schonmal versucht, nen Mac Mini in einen 19"-Schrank zu stellen? So geht's:

(anklicken zum Vergrößern)

Thx @ MP45: "ein hoch auf kabelbinder!"

Enumerate MySQL table

If you have a table "tablename" with a (non-PK) column "number" and you want to enumerate all existing rows starting with 1000 you can use the following SQL statement:

SET @n = 999;
DROP TABLE IF EXISTS `tablename_tmp`; 
CREATE TEMPORARY TABLE `tablename_tmp` (`tmpid` INT PRIMARY KEY, `n` INT);
INSERT INTO `tablename_tmp` SELECT `id`, @n := @n + 1 FROM `tablename`;
UPDATE `tablename` SET `number` = 
    (SELECT `n` FROM `tablename_tmp` WHERE `tmpid` = `id`);
DROP TABLE `tablename_tmp`;

Encrypted files with Flexbackup

Flexbackup is a very nice and flexible tool to create full, incremental and differential backups. But if you store your backups in an untrusted environment you might want do encrypt the created archive files. Flexbackup cannot handle it by default, but there is a very simple way to get the desired results by replacing the default gzip binary with a wrapper file.