Monthly Archive for juillet, 2008

Trouver de l’essence au meilleur prix

En cherchant l’évolution du prix du SP95 sur la dernière décennie j’ai trouvé un site gouvernemental.http://www.prix-carburants.gouv.fr/

Grâce à cet astucieux mashup (Google Maps + Prix litre d’essence par station),

il est possible de trouver du carburant au meilleur prix géographiquement:

Mashup

Antibes, c’est à la station service de Casino (70 Avenue Philippe Rochat).
Le SP95 est à 1,372€/L

Les données sont rafraichies tous les jours ou presque…


  Partager sur Wikio

K2 n’est pas seulement un thème wordpress

k2

K2, le vrai

Avant d’être un thème wordpress le K2 est la deuxième plus haute montagne du monde derrière l’Everest.

Aujourd’hui c’est l’anniversaire de l’ascension du K2.
La première ascension a eu lieu le 31 Juillet 1954, il y a exactement 54 ans, par deux italiens Achille Compagnoni et Lino Lacedelli.


  Partager sur Wikio

Expect pour les rebonds ssh

Aprés un sudo apt-get install expect, voici le contenu du fichier ssh-bound :

#!/usr/bin/expect -f
# des que la chaine de caractère attendu en retour est matché,
# on attend 1 seconde et on envoit notre chaine
set timeout 1
# la 1ere commande qui est executée sur notre machine
# c’est le 1er saut
spawn ssh user@host1
# on “attend” du shell qu’il nous renvoit la chaine “assword”
expect “*?assword :”
# on envoit notre pw, \r pour retour chariot
send — “MON_SUPER_PASS_EN_CLAIR\r”
# le prompt
expect “*05b\$ ”
# 2eme saut
send — “ssh user@host2\r”
expect “*?assword :”
send — “MON_SUPER_PASS_EN_CLAIR\r”
expect “*05b\$ ”
# 3eme saut#!/usr/bin/expect -f
# des que la chaine de caractère attendu en retour est matché,
# on attend 1 seconde et on envoit notre chaine
set timeout 1
# la 1ere commande qui est executée sur notre machine
# c’est le 1er saut
spawn ssh user@host1
# on “attend” du shell qu’il nous renvoit la chaine “assword”
expect “*?assword :”
# on envoit notre pw, \r pour retour chariot
send — “MON_SUPER_PASS_EN_CLAIR\r”
# le prompt
expect “*05b\$ ”
# 2eme saut
send — “ssh user@host2\r”
expect “*?assword :”
send — “MON_SUPER_PASS_EN_CLAIR\r”
expect “*05b\$ ”
# 3eme saut
send — “ssh user@host3\r”
expect “*?assword :”
send — “MON_SUPER_PASS_EN_CLAIR\r”
expect “*05b\$ ”
# expect nous rend la main
interact
send — “ssh user@host3\r”
expect “*?assword :”
send — “MON_SUPER_PASS_EN_CLAIR\r”
expect “*05b\$ ”
# expect nous rend la main
interact

Source


  Partager sur Wikio

Réussite incontestée de la distribution Linux Ubuntu

Aprés avoir commandé 2 CDs 32 bits (Ubuntu Desktop,Ubuntu Server), j’ai reçu gratuitement le colis par la poste.

Colis Ubuntu

Colis Ubuntu

Lettre d'information de Canonical

Lettre d'information de Canonical

Délai: 15 jours.
Etat d’emballage: parfait.

Enfin les moyens sont mis afin de diffuser gratuitement et au plus grand nombre un OS Linux de qualité et utilisable rapidement.

Rappelons la baseline de Ubuntu: “linux for human being“.


  Partager sur Wikio

Perl - timestamp <-> date

  • TimeStamp vers Date

$ perl -e “print scalar(localtime(1173279767))”

  • Date vers TimeStamp

$ perl -MPOSIX -e “print (mktime(10,45,11,31,4,107));”

Avec :
# mktime(sec, min, hour, mday, mon, year, wday = 0, yday = 0, isdst = 0)
#
# The month (mon), weekday (wday), and yearday (yday) begin at zero.
# The year (year) is given in years since 1900.
# Sunday is 0, not 1;
# January 1st is 0, not 1.
#
# I.e. January is 0, not 1;
# I.e. The year 1995 is 95; the year 2001 is 101.
# I.e. Calendar time for December 12, 1995, at 10:30 am : mktime( 0, 30, 10, 12, 11, 95 );
#
# Greenwich Mean Time (GMT)
# Daylight saving Time (DST)
# Coordinated Universal Time (CUT)
##################################

Source


  Partager sur Wikio

Linux - Les basiques sur screen

man screen

Screen  is  a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells).  Each vir‐tual terminal provides the functions of a DEC VT100 terminal and, in addition, several control functions from the ISO 6429 (ECMA 48,  ANSI  X3.64) and  ISO  2022 standards (e.g. insert/delete line and support for multiple character sets).  There is a scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows moving text regions between windows.

When screen is called, it creates a single window with a shell in it (or the specified command) and then gets out of your way so that you can use the program as you normally would. Then, at any time, you can create new (full-screen) windows with other programs in them (including more shells), kill existing windows, view a list of windows, turn output logging on and off, copy-and-paste text between windows, view the scrollback history, switch between windows in whatever manner you wish, etc. All windows run their programs completely independent of each other. Programs continue to run when their window is currently not visible and even when the whole screen session is detached from the user’s terminal. When a program terminates, screen (per default) kills the window that contained it. If this window was in the foreground, the display switches to the previous window; if none are left, screen exits.

Everything you type is sent to the program running in the current window. The only exception to this is the one keystroke that is used to initi‐ate a command to the window manager. By default, each command begins with a control-a (abbreviated C-a from now on), and is followed by one other keystroke. The command character and all the key bindings can be fully customized to be anything you like, though they are always two characters in length.

Pourquoi utiliser screen ?

  • multiplexer un terminal !
  • lancer des scripts en tache de fond

Basiques

  • Création d’un screen nommé

screen -S screen1

  • Sortir du screen

CTRL-A puis d

  • Récupérer un screen nommé

screen -r (si vous n’avez créé qu’un seul screen)
screen -r screen1


  Partager sur Wikio

Exim - Supprimer un mail en attente

1. Statut de la file :
>mailq
7m 369 1KMyus-0004dc-Of
user@domain.fr
2. Suppression
>exim -Mrm 1KMyus-0004dc-Of
Message 1KMyus-0004dc-Of has been removed


  Partager sur Wikio

Cuil.com le nouveau rival de Google ?

Cuil.com vient de voir le jour…
Enfin ca fait déjà 2 ans que des anciens de chez Google bossent dessus.

Cuil.com et ses 121,617,892,992 documents web:



  Partager sur Wikio