pense-bête

apt-mirror et translation i18

Il faut modifier /usr/bin/apt-mirror pour gérer les translations ligne 355 pour wheezy ligne 363 pour squeeze il vous faut trouver ces lignes de codes foreach (@components) { add_url_to_download($url . $_ . « /binary- » . $arch . « /Release »); add_url_to_download($url . $_ . « /binary- » . $arch . « /Packages.gz »); add_url_to_download($url . $_ . « /binary- » . $arch . « /Packages.bz2 »); et …

apt-mirror et translation i18 Lire la suite »

Splitter un dump mysql avec Bash, en 1 dump par table

#!/bin/bash file=$1 # the input file directory= »$file-splitted » # the output directory output= »$directory/header » # the first file containing the header GREP= »DROP TABLE » # what we are looking for mkdir $directory # create the output directory while read line do # if the current line contains the wanted statement if [ $(echo « $line » | grep -c « $GREP ») …

Splitter un dump mysql avec Bash, en 1 dump par table Lire la suite »

Collectd, monitorer mysql

coté collectd Host « localhost » User « collectd » Password « Secrets of the Universe with Philo » Database « mysql » # MasterStats true coté Ligne de commande mysql -u root mysql> CREATE USER ‘collectd’@’localhost’ IDENTIFIED BY ‘password’; mysql> GRANT SELECT, PROCESS, SHOW DATABASES, SUPER ON *.* TO ‘collectd’@’localhost’; mysql> FLUSH PRIVILEGES;

Envoyer des emails avec piece jointe en ligne de commande sous Linux

Envoi d’un email + pièce jointeecho "Ci-joint la photo de ma voiture" | mutt -s "Ma voiture" -a voiture.jpg — toto@toto.comLa même chose sans texte d’explication :echo | mutt -s "Ma voiture" -a voiture.jpg — toto@toto.comoumutt -s "Ma voiture" -a voiture.jpg — toto@toto.com < /dev/nullEnvoi d’un email avec plusieurs pièces jointes :echo | mutt -s …

Envoyer des emails avec piece jointe en ligne de commande sous Linux Lire la suite »

Emulating a high latency network connection using Linux and TC

Often it is necessary for testing purposes to recreate the networking conditions found in a high latency network, such as a satellite link. Firstly create a network bridge that can be placed inbetween the test network and its router. To increase network latency use the following command: tc qdisc add dev eth0 root netem delay …

Emulating a high latency network connection using Linux and TC Lire la suite »

ShrimpWorks » Change your console resolution and colour depth

Pour la console système kernel : vga= Colors ( depth) 640×480 800×600 1024×768 1280×1024 1600×1200 —————+——-+——-+——–+———+——— 256 ( 8 bit)| 769 771 773 775 796 32,768 (15 bit)| 784 787 790 793 797 65,536 (16 bit)| 785 788 791 794 798 16.8M (24 bit)| 786 789 792 795 799 viaShrimpWorks » Change your console resolution …

ShrimpWorks » Change your console resolution and colour depth Lire la suite »

Chroot SSH et PTY allocation avec Debian Lenny Pour mettre en place des serveurs de backup, j’utilise un script chroot-ssh.sh qui permet la construction d’un chroot minimal pour faire tourner un serveur SSH et faire du rsync. Avec la mise-à-jour vers Lenny, l’allocation PTY réalisée par SSHD change : il ne semble plus possible de …

Lire la suite »

Retour en haut