toucheatout  2006-03-03 16:28  

"Touche à tout" is a french expression (means "touch to everything") used to designate people who like doing a bit of everything, learning at least the basics of whatever the subject is. As opposed as secializing and not getting interest in anything else than the subject. While computer science is the site's primary focus, linux and ai get the most attention. As there is no fixed boundary to the subjects encompassed and I'm lazy to make a subdomain, there also is a french language section.

On the last apparitions and setups, aside a would-be musical groups and roles page. you may find the beginning of the book about all and everything. The atmosphere is quite similar to a wiki, having no clear-cut purpose and edition capabilities.

  toucheatout  2008-03-04 13:16  

Simple upload with onsuccess/onerror redirection

Filename is chosen with the IP as suffix, which is unsufficient in the general case and left as an example.
<?php
if(!empty($_FILES['file_uploaded']['tmp_name']) &&
   is_uploaded_file($_FILES['file_uploaded']['tmp_name'])) {

  if(move_uploaded_file($_FILES['file_uploaded']['tmp_name'],
   'img/upload.' . $_SERVER['REMOTE_ADDR'])) {
          header('Location: upload.php?res=success&filename=upload.' .
                  $_SERVER['REMOTE_ADDR']);
        }
        else
        {

      
  toucheatout  2008-03-01 17:30  francophone  

Neuf cent mille prisonniers
Cinq cent mille politiques
Un million de travailleurs

Maîtresse de leur sommeil
Donne-leur des forces d’homme
Le bonheur d’être sur terre
Donne-leur dans l’ombre immense
Les lèvres d’un amour doux
Comme l’oubli des souffrances

Maîtresse de leur sommeil
Fille femme sœur et mère
Aux seins gonflés de baisers
Donne-leur notre pays
Tel qu’ils l’ont toujours chéri
Un pays fou de la vie

Un pays où le vin chante
Où les moissons ont bon cœur
Où les enfants sont malins
Où les vieillards sont plus fins

  toucheatout  2008-02-29 05:03  

Dialogue où le moribond réaffirme son athéisme au seuil de la mort et dispute au prêtre la conception divine. Ecrit par le marquis Donatien de Sade en 1782.

  toucheatout  2008-02-29 04:23  Web  

This code is designed to prevent execution of some script ('say /maintenance.php), that has to be run from a remote host or from the host itself. The snippet is to be put at the beginning of the script.


if ($_SERVER['REMOTE_ADDR'] != '1.2.3.4' || $_SERVER['REMOTE_ADDR'] != '127.0.0.1') { header('Location: /');exit(); }

Note:

  • The exit() is not necessary, it is just paranoia :)
  toucheatout  2007-08-15 16:02  Linux  

Linux's bash shell is certainly one of the most comfortable shells around. While reading its (4800+ lined) man page is certainly worth it, here are highlighted some features.

Pattern matching

  toucheatout  2007-03-13 16:53  francophone  
  toucheatout  2007-03-12 11:19  

Apt-get easter-egg

Even debian has some. Due respect being shown where it belongs in debian, it is a textmode easter-egg

apt-get moo

Which yields:

root@connex:/root# apt-get moo
         (__)
         (oo)
   /------\/
  / |    ||
 *  /\---/\
    ~~   ~~
...."Have you mooed today?"...
root@connex:/root#

PS: prefer aptitute to apt-get, it features the same great functionalities (commands) and is slighlty faster to type with autocompletion (the 'i' being simpler for me to type than the '-'). It also gives more detailed information on th

  toucheatout  2007-02-23 14:23  

This yet another simple feature that can change one's life on certain occasions, when a GUI is mandatory for a task.
To use X forwarding over a secure ssh connexion, there are 2 steps : configure the ssh server to allow it, and instruct ssh to use it when connecting.
The drawback on a server is that you will have to install a working X Window system to use the feature, and that can be quite heavy.

Configure sshd to accept X forwarding

Get to the configuration file /etc/ssh/sshd_config and locate the following directives that control the behavior of X forwarding over ssh:

X11Forwarding no
X11DisplayOffset 10

  toucheatout  2007-02-06 16:51  Web  

Getting a PHP easter-egg

This isn't well-known usually, but PHP features easter-eggs. You can try on a php-enabled website (that has an index.php)
/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42

Which is a neat way of finding out wether a site uses php or not (see below a way of not disclosing this info)

For instance http://www.toucheatout.net/?=PHPE9568F36-D428-11d2-A769-00AA001ACF42 (should be a little dog's picture, the image is dependant on php's version)

Other strings that yield rather undocumented results :

 
yro.slashdot.org - Your Rights online


nytimes.com New York Times - International