Archive for the 'Geek life style & tech jokes' Category

Nouveau disque

Tuesday, September 12th, 2006

Disk /dev/sda: 1199.9 GB, 1199966257152 bytes

/dev/sda:
Timing buffered disk reads: 474 MB in 3.01 seconds = 157.45 MB/sec

root@backup:~# df -h /backup
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 1.1T 528K 1.1T 1% /backup

Package Debian PEAR

Sunday, August 20th, 2006

cyrilb: bon, je dois filer
cyrilb: a+
loic: :-)
loic: attends
loic: question rapide package php
cyrilb: ouais
loic: tu as déjà package un truc qui utilise pear ?
cyrilb: non
loic: voila, merci ;-)
cyrilb: c’etait facile comme question :)

Facture en date du 0000-00-00

Sunday, August 20th, 2006

cyrilb: thierry: t’es au courant du bug ?
Thierry: fanzila: y avait une transaction avec une date 0000-00-00 ce matin
cyrilb: thierry: et alors ?
cyrilb: thierry: on a vendu un site à Jesus le 0000-00-00
cyrilb: et ouais
fanzila: cyrilb: MDR
cyrilb: :)

Petits trésors

Sunday, August 13th, 2006

J’ai fais du rangement chez ma mère de mes vieux trucs qui trainent chez elle. Quelques bons souvenirs…

Function system(), « moi c’est comme toi mais en mieux »

Wednesday, August 9th, 2006
  1. an adapted version of the system() function
# returns the return code of $command
# if given $stdout a reference to a string, will put the standard output
# there, idem for $stderr

sub system {
my ($command,$stdout,$stderr)=@_;

my $tmpname=TMPDIR."/perl_ctk_system$$";

my $toexec = "$command 1>". ( $stdout ? "$tmpname.stdout":'/dev/null') . " 2>". ( $stderr ? "$tmpname.stderr":'/dev/null');

$rc = 0xffff & system $toexec;

if ($stdout) {
$$stdout=&readfile("$tmpname.stdout");
unlink "$tmpname.stdout";
}

if ($stderr) {
$$stderr=&readfile("$tmpname.stderr");
unlink "$tmpname.stderr";
}

return $rc;
}

3 juillet 2000

On note au passage, l’utilisation de 2 fichiers temporaires pour recupérer STDOUT et STDERR… très optimal.

Useless function

Wednesday, August 9th, 2006

oshosting/www/functions/general.php:

function osh_print_html($html)
{
return ($html);
}
(...)
echo osh_print_html('‘);
echo osh_print_html(’
‘);

Mon site web en 1998

Tuesday, August 8th, 2006

Je viens de retrouver sur un vieux ZIP100, mon site web tel qu’il était en février 1998.