Pense bête
De Stéphane Brunner.
http://dev.openstreetmap.de/aio/switzerland/gmapsupp.img.bz2
{| class="wikitable"
| cell 1 || cell 2
|}
=>
| cell 1 | cell 2 |
Autre
- <br style="clear:both;">
Safe close
Alt-SysRq-R (passe ton clavier en mode xlate, tu peux retenter les combinaisons précédentes à partir de là) Alt-SysRq-S (sync les disques) Alt-SysRq-E (envoit SIGTERM à tous les processus) Alt-SysRq-I (envoit SIGKILL à tous les processus) Alt-SysRq-U (remonte tout en readonly) Alt-SysRq-B (reboot)
OSM
- http://b.tile.openstreetmap.org/18/135171/94300.png/dirty
- Lausanne
- Box : osm, me
- Box : osm, me
- Baptments
- http://xapi.openstreetmap.org/api/0.6/way[building=yes][bbox=6.58,46.5,6.68,46.55]
- Landuse
- wget http://xapi.openstreetmap.org/api/0.6/way[landuse=*][bbox=6.58,46.5,6.68,46.55] -T 1800 -O landuse.osm
- Multipolygon
- wget http://xapi.openstreetmap.org/api/0.6/relation[type=multipolygon][bbox=6.58,46.5,6.68,46.55] -T 1800 -O multipolygon.osm
- os addresses node: wget http://xapi.openstreetmap.org/api/0.6/node[oa:imported_by=sbrunner][bbox=5.85,45.75,10.55,47.85] -T 1800 -O oa.osm
- Rails
- wget http://xapi.openstreetmap.org/api/0.6/way[railway=*][bbox=6.1,46.3,7.2,46.9] -T 1800 -O railway.osm
- fix
- wget http://xapi.openstreetmap.org/api/0.6/relation[type=boundary][bbox=6.6315,46.525,6.6316,46.526] -O boundary.osm
- wget http://xapi.openstreetmap.org/api/0.6/node[place=*][bbox=6.6315,46.525,6.6316,46.526] -O place.osm
- wget http://api.openstreetmap.org/api/0.6/relation/51701/full -O suisse.osm
- wget http://api.openstreetmap.org/api/0.6/relation/16042/full -O suisse-old.osm
- wget http://xapi.openstreetmap.org/api/0.6/way[natural=water][bbox=5.9,45.8,10.55,47.83] -O water.osm
VaudTax
Comment installer VaudTax sur Ubuntu Linux
Gestion de paquets
Compilation de modules sous Debian-Ubuntu
Télécharger les sources
sudo apt-get install 'module'-source
Compile et installe le module
sudo module-assistant prepare # May not be needed sudo module-assistant get 'module' sudo module-assistant build 'module' sudo module-assistant install 'module'
Ou plus simplement
sudo module-assistant auto-install 'module'
Commandes utile pour créer un système identique au premier
Pour obtenir les paquets installé (dans le fichier liste) :
dpkg --get-selections | grep install | awk '{print $1}' > liste
ou
COLUMNS=300 && dpkg -l | grep ^ii | awk '{print $2}' > liste
Pour les installer :
sudo dpkg --set-selections < liste && sudo apt-get dselect-upgrade
ou
sudo apt-get install `cat liste`
Repris de : http://forum.ubuntu-fr.org/viewtopic.php?id=8137, http://forum.ubuntu-fr.org/viewtopic.php?pid=96937#p96937
Debfoster
On peut également utiliser debfoster qui a l'aventage de tenir compte des dépandances :
sudo apt-get install debfoster # Install sudo mv /var/lib/debfoster/keepers /var/lib/debfoster/keepers.bak # Sauve l'ancien fichier si existant ! sudo debfoster -q # Crée la liste de paquets dans le fichier /var/lib/debfoster/keepers
APT-dpkg
- Recherche
apt-cache search outlook
- Liste des paquet installer sans les dépendances (résultat dans /var/lib/debfoster/keepers).
sudo rm /var/lib/debfoster/keepers; sudo debfoster -q
Build
sudo apt-get build-dep package apt-get -b source package
or
sudo apt-get build-dep package apt-get -b source package cd package-version dpkg-buildpackage -b -uc
https://linuxfr.org/tips/19.html http://www.fr.debian.org/doc/manuals/apt-howto/index http://www.fr.debian.org/doc/manuals/apt-howto/ch-search.fr.html#s-apt-file http://www.fr.debian.org/doc/manuals/apt-howto/ch-sourcehandling.fr.html
Script de désinstallation
/var/lib/dpkg/info/*.prem
Liste des fichiers d'un paquet
dpkg -L paquet
Appartenance d'un fichier à un paquet
dpkg -S fichier
- search ubuntu packages to find which package contains the executable program programname
apt-file find bin/programname
Enlever les résidus de configuration
sudo dpkg --purge `dpkg -l | grep ^rc | awk '{print $2}'`
Connaître les plus gros paquets
dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n'|sort -n|grep installed
ou
wajig size|grep installed
- keys
sudo apt-key list
sudo apt-key add /usr/share/keyrings/*
YUM-rpm
Trouver un fichier disponible mais pas installer
rpm -qf /sbin/lsusb
Lister les paquets
rpm -qa | grep <paquet>
Liste des fichiers d'un paquet
rpm -ql paquet
Appartenance d'un fichier à un paquet
rpm -qf fichier
Configuration
Clavier
sudo dpkg-reconfigure console-setup
Langue
sudo dpkg-reconfigure locales
Xorg
sudo dpkg-reconfigure xserver-xorg
http://packages.debian.org/fr/squeeze/x11-utils
Sudo
Log on root
apt-get install sudo vim visudo
Add at end :
# Members of the admin group may gain root privileges %admin ALL=(ALL) ALL
then add admin groop
groupadd admin adduser username admin exit
Log as username to remove root password
sudo passwd -l root
Shell script
- http://madchat.org/coding/sh/write_a_shell_script-fr.htm
- http://lea-linux.org/cached/index/Dev-shell_script.html
- http://cybersdf.org/2006/01/21/172-guide-survie-en-ligne-de-commande
- http://www.linuxfocus.org/Francais/September2001/article216.shtml
- Commandes UNIX
- http://www.shellunix.com/csh.html
Start ksh
exec ksh
Permission de fichiers pas défaut
Dans le fichier /etc/profile change umask 022 en par exemple umask 002 (pour donner le droit d'écriture au groupe).
Grep
Négatif
grep -v
Sed
Find-replace
sed 's/find/replace/g' file
Enlève ligne vide
sed '/^[[:space:]]*$/d' file
Paramètres
sed 's/find/pre\1post/g' file
Voir aussi :
find
Simple find grep:
find . -type f -print | xargs grep TODO
Lister les fichiers java :
find . -name *.java -print | while read f; do echo $f done
Convention d'encodage des nom de fichiers (à tester, ne gère pas les dossiers !!!) :
find . -name *.java -print | while read f; do f2=`echo $f | iconv --from-code=ISO-8859-1 --to-code=UTF-8`; echo "from: $f"; echo "to: $f2"; #mv $f $f2; done
détachement du terminal
- screen
screen cmd # detatch Ctrl+a d # re-attache screen -d -r
# new tab with title screen -t 'title' # edit title C-a A
auto start : http://taint.org/wk/RemoteLoginAutoScreen
- nohup
bash
!! refait la dernière commande !cmd refait la dernière commande commençant par cmd !cmd:p permet de visualiser la dernière commande commençant par cmd
- Press Any Key to Continue
read -sn 1 -p "Press any key to continue..."
- Error to message
- Envoie la sortie d’erreur et la sortie standard
ls /toto 2>&1 > ls.txt
Autre
- nb lignes
wc -l
- split
split [-linecount | -l linecount ] [ -a suffixlength ] [file [name] ] split -l 300 file.txt new
- fichiers ouvert
lsof
- Librairies utilisées
ldd `which sox`
sysV rc
sudo uptade-rc.d ServiceName defaults
Réseau (network)
- Limiter la bande passante
trickle -d 10 wget http://linuxfr.org/
- Nom à partir de l'adresse IP
host 192.168.1.1
- Adresse IP à partir d'un nom
host sun4
- Mac adresse
ping -c 2 server arp -a
- Acrive connexions
netstat --protocol=inet -p
ou
lsof -i
- Lister les services lancés et les ports qu'ils utilisent
nmap -p 1-10000 localhost
- process tcp en mode listenning
netstat -tlnp
- process udp en mode listenning
netstat -ulnp
- process en mode listenning
netstat -lnp
- tous les process ouverts
netstat -anp
- Dump
tcpdump
- Analyser est un serveur avec wireshark
sur le serveur
sudo tcpdump -i eth0 -x -s0 -w /tmp/dump0.dump
sur un client quelconque avec wireshark
scp serveur:/tmp/dump0.dump .
puis cliquer sur open dans wireshark pour lire la capture ainsi obtenue
IPTables store
edit file /etc/network/option and activate forward
ip_forward=yes
uncompress iptables
gunzip /usr/share/doc/iptables/examples/oldinitdscript.gz -c > /etc/init.d/iptables chmod +x /etc/init.d/iptables mkdir /var/lib/iptables chmod 700 /var/lib/iptables
with sysv-rc-conf activate level 2, 3, 4, 5, 6, S
/etc/init.d/iptables save active /etc/init.d/iptables load inactive /etc/init.d/iptables load active
DNS
nslookup name_to_test.com
dig name_to_test.com
dig +short -x {ip}
host {checkIp or hostname} [dns server]
Network manager
- Restart
sudo "/etc/dbus-1/event.d/25NetworkManager restart" sudo "/etc/dbus-1/event.d/26NetworkManagerDispatcher restart"
NFS
http://www.bxlug.be/articles/200
showmount -e 192.168.1.40
192.168.1.40:/home/Share /mnt/iomega_NAS_100 nfs user,rsize=8192,wsize=8192,timeo=14,intr,noauto 0 0
nosuid ?
Voir aussi :
Désactive IPV6
Editer le fichier :
/etc/modprobe.d/aliases
Rechercher la ligne :
alias net-pf-10 ipv6
Remplace par :
alias net-pf-10 off
Sauve reboot.
Source : http://ubuntuforums.org/showthread.php?t=6841
Securité
sudo apt-get install sshguard denyhosts chkrootkit
Hoax
Monitoring
Zabbix
Oreon
Proxy
Transparent
sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -m owner --uid-owner proxy -j ACCEPT sudo iptables -t nat -A OUTPUT -p tcp --dport 3128 -m owner --uid-owner proxy -j ACCEPT sudo iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-port 8080
Squidguard
http://cri.univ-tlse1.fr/documentations/cache/squidguard.html
sudo -s zcat /usr/share/doc/squidguard/examples/squidGuard.cgi.gz | iconv -f iso8859-1 -t utf8 > /usr/lib/cgi-bin/squidGuard.cgi
FTP
- ProFTP
- http://www.proftpd.org/docs/directives/linked/config_ref_Anonymous.html
- http://www.coagul.org/article.php3?id_article=184
- Clients
- mirror
- ftp-uploader
- tnftp
- lftp
- wget
- wput
Postfix
Dans le main.cf renseignes le smtp de ton provider (relayhost=), le hostname et le mydomain.
http://forum.ubuntu-fr.org/viewtopic.php?pid=1599603#p1599603
NIS
sudo apt-get install nis
domain name: msr
on file /etc/yp.conf add:
ypserver 192.168.1.2
on file /etc/passwd add:
+::0:0:::
on file /etc/shadow add:
+::::::::
on file /etc/group add:
+:::
add the public IP (128.178.70.177) to the fileserver file /etc/ypserve.securenet.
NTP
sudo apt-get install ntpdate ntp-server
Edit file /etc/default/ntpdate :change NTPSERVERS to cognac.epfl.ch ⇒
NTPSERVERS="cognac.epfl.ch" #NTPSERVERS="pool.ntp.org" # # additional options for ntpdate #NTPOPTIONS="-v" NTPOPTIONS="-u"
sudo apt-get install libpam-ldap libnss-ldap portmap openssh-server sendmail nfs-common
LDAP & PAM & NSS
Edit files for LDAP (128.178.70.40 / lthcserv1.epfl.ch - dc=lost - bind_policy soft)
/etc/libnss-ldap.conf /etc/nss-ldap.conf /etc/pam_ldap.conf
Edit files for pam & nss see http://doc.ubuntu-fr.org/applications/ldap_client
/etc/nsswitch.conf /etc/pam.d/common-account /etc/pam.d/common-auth /etc/pam.d/common-password /etc/pam.d/common-session
Test
getent passwd some_ldap_user getent group some_ldap_group
sendmail
(/etc/main/sendmail.cf) the line start with D replace by**
Dlthmail.epfl.ch
Cups
Edit files for cups activate browsing
/etc/cups/cupsd.conf
add
Browsing On
Entrez le texte non formaté ici
Top
top # CPU iftop # network iotop powertop latencytop
Bluetooth
sudo hciconfig -a hcitool dev
- up
sudo hciconfig up hci0 sudo /etc/init.d/bluetooth restart
- scan
hcitool scan
- rfcomm
sudo vi /etc/bluetooth/rfcomm.conf
Administration
Locate
sudo ln -s /usr/bin/updatedb /etc/cron.hourly/
Disk
- Test d'integrité
e2fsck -Stpf
- Correct system size _?
tune2fs -s1
- Mesure vitesse
sudo hdparm -Tt /dev/hdc
- Partitions
sudo fdisk -l
- UUID, ...
sudo blkid
- Formater une clé USB
sudo mkfs.ext4 -m 0 -L LABEL /dev/sd?
- Formater un disk pour des tuilles (df -i)
sudo mkfs.ext4 -m 0 -b 1024 -N 50000000 -L LABEL /dev/sd?
- Nommer une partition
sudo tune2fs -L LABEL /dev/sd?
debugfs testdisk ...
Grub
sudo grub
root (hd0,0) find /boot/grub/stage1 setup (hd0)
http://www.sorgonet.com/linux/grubrestore/
Supprime le Master boot record
Enlever le MBR ainsi que la table de partitions :
dd if=/dev/null of=/dev/sdX bs=512 count=1
Enlever uniquement le MBR :
dd if=/dev/null of=/dev/sdX bs=446 count=1
http://www.cyberciti.biz/faq/linux-how-to-uninstall-grub/
Générate modeline
gtf 1920 1200 60 -x
Image
- crop
convert -crop wxh+x+y +repage src.png dest.png
- replace collor
convert -fill '#b5d0d0' -opaque '#000000' src.png dest.png
- compression
# not allways usefull convert img.png img.jng convert img.jng img.png rm img.jng
# max -o3 dons usefull result with less than two times time optipng -q -o7 img.png
Vidéo
ffmpeg -i video.avi -ab 40 -ar 44100 -b 60 -r 15 -s 160x120 -f flv video-100.flv ffmpeg -i video.avi -ab 56 -ar 44100 -b 200 -r 15 -s 320x240 -f flv video-256.flv ffmpeg -i video.avi -ab 96 -ar 44100 -b 400 -r 15 -s 320x240 -f flv video-496.flv
ffmpeg -i video.avi -ab 56 -b 500 -r 15 -s 320x240 -f flv video.flv ffmpeg -i video.avi -ab 56 -b 200 -r 15 -s 320x240 -f flv video.flv
mencoder video.mp4 -o video.flv -lavcopts vcodec=flv:vbitrate=512 -oac mp3lame -ovc lavc
Voir aussi :
Transformer les images en film
mencoder "mf://*.png" -mf fps=10 -o output.avi -ovc lavc -lavcopts vcodec=mpeg4
N95
ffmpeg -i input_video -f mp4 -vcodec mpeg4 -b 500000 -r 15 -s 320x240 -acodec aac -ar 24000 -ab 128 -ac 2 output_video.mp4
Informations sur le système (uname)
Version complète du kernel
uname -r
Nom de la machine
uname -n
USB view
cat /proc/bus/usb/devices
Debian
gforge : alioth.debian.org
- Debian-np
- debian-multimadia
- debian-desctup
- http://bugs.debian.org/Bugs
- http://db.debian.oeg
- http://packages.debian.org
Documentation
Installing Debian Sarge from a USB memory stick (USB key) : http://d-i.pascal.at/
accsess :
- http://mdbtools.sourceforge.net/
- http://fr.openoffice.org/Documentation/How-to/indexht.html
- http://fr.openoffice.org/Documentation/How-to/Bdd/04migrfr.pdf
- http://www.kexi-project.org/
- http://www.knoda.org/
Debian : Formation : http://people.via.ecp.fr/~alexis/formation-linux/formation-linux.html
fr-ch
- http://iacs.epfl.ch/~prudhomm/
- http://doc.domainepublic.net/linux/faq_debian-user/debfr-liste.html
- http://www.debian.org/international/French
- http://packages.qa.debian.org/
Windows
ext2
sécurité
- http://sourceforge.net/project/showfiles.php?group_id=64424&package_id=76046&release_id=144640 (CodeSeeker)
- http://sourceforge.net/projects/tdifw/ (TDI FireWall)
xpy est un petit logiciel permettant de sécuriser Windows : http://www.framasoft.net/article2903.html
Matériel
portable sans windows https://linuxfr.org/2004/05/13/15986.html
- http://ataria.errex.net/
- http://www.xbook-computer.com/catalog/product_info.php?cPath=40_74&products_id=135
- http://d-i.alioth.debian.org/manual/fr.i386/ch02.html
Ménagerie
- http://ydegoyon.free.fr/pidip.html
- http://mcs.hackitectura.net/tiki-index.php
- http://subsignal.org/pakt/
- http://www.constantvzw.com/
- http://garbure.org/ratatouille/?el=Download
- http://wiki.frimouvy.org/wakka.php?wiki=VideoSousLinux&show_comments=1
- Pitivi - http://www.pitivi.org/
- openVIP - http://openvip.sourceforge.net/
- cinelerra - deb http://www.kiberpipa.org/~minmax/cinelerra/builds/sid/ ./
VI
| SHIFT | v | selectionne ligne |
| v | selectionne caractaires | |
| CTRL | v | selectionne zone |
| SHIFT ! | => cmd | |
| ! cmd | insert dans la selection (grep, sort, ...) | |
| u | undo | |
| CTRL | r | redo |
| y | copy | |
| p | past | |
| ~ | change case | |
| * | hight light | |
| /text | search | |
| n | next | |
| SHIFT | n | previous |
| CTRL | wv | split windows vertically |
| CTRL | ww | switch between windows |
| :only | close other windows | |
| :set noai | désactive l'auto indentation | |
| q name | record | |
| @ name | exec | |
| . | redo last cmd | |
| :%s/foo/bar/g | recherche toutes les occurrences de foo et les remplace par bar sans confirmation. | |
| :%s/foo/bar/gc | recherche toutes les occurrences de foo et les remplace par bar avec demande de confirmation. | |
| :%s/<foo>/bar/gc | recherche (mot seulement) et remplace toute les occurrences de foo par bar. | |
| :%s/foo/bar/gci | recherche (insensible à la case) et remplace toute les occurrences de foo par bar. | |
| :%s/foo/bar/gcI | recherche (sensible à la case) et remplace toute les occurrences de foo par bar. | |
| \r | cage return (new line) | |
| source : http://www.vim.org/tips/tip.php?tip_id=31 | ||
RegExp
. tout caractère
* répète n fois
[] bloc de choix
\s espace
\w 0-9a-zA-z, ...
^ début de ligne
$ fin de ligne
Cups
- http://localhost:631
- http://support.stat.ucla.edu/view.php?supportid=86
- http://www.ahinc.com/linux101/printing.htm
/usr/bin/enable `lpstat -t | grep disabled | awk '{print $2}'`
lpstat -t && echo "***" && lpq
Servers
Webmin : https://localhost:10000
Apple
netatalk
Sécurité
- http://www.pcflank.com/test1.htm
- http://firestarter.sourceforge.net/
- http://www.archilinux.org/securit/secu.html
- http://www.shorewall.net/standalone_fr.html
- http://arnofear.free.fr/linux/shorewall-1.php
OutLook
autre solution : tu exportes en eml et tu utilises eml2mbox que tu peux trouver sur http://www.broobles.com/eml2mbox/
autre solution 2 : tu peux peut-etre passer par l'import/export de mozilla outlook -> mozilla -> evolution
Man
Konqueror: man:/ls apache: man2html
- http://www.oscommerce.org/
- http://www.xfld.org/Xfld/en/index.html
- http://c-arbre.pacageek.org/ressources/pages/features/
Link
Live CD
antivirus :
- http://antesis.org/rubrique.php3?id_rubrique=2&lang=fr
- http://www.bitdefender.com/bd/site/products.php?p_id=40
Multimedia :
Sound
Enemy etrritory artsdsp -m et
Musique (MAO)
- Lecteur musique
- Mixxx
- Mixage
- Livemix
- Effets
- LV2rack, Zynjacku
- Analyse
- Sonic Visualiser, Japa, SonaSound, eXtace
- Enregistrement : QARecord, Rezound
- Gestion
- QJackCtl, Patchage, Glash ... Ladish
- Autre
- JDelay, DRC, Freqtweak
linux-image-rt
extendedPDF
- Remove security limitations from PDF documents using ghostscript
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=OUTPUT.pdf -c .setpdfwrite -f INPUT.pdf
Conversion d'encodage (table de caractères)
iconv --from-code=ISO-8859-1 --to-code=UTF-8 < old_file > new_file
Fix encodage
iconv -c --from-code=UTF-8 --to-code=UTF-8 < errors > fix
Conversion de fin de ligne
liste d'encodage
recode -l
conversion
recode /cl../cr <dos.txt >mac.txt recode /cr.. <mac.txt >unix.txt recode ../cl <unix.txt >dos.txt
Tools
mtools fuser ps aux
GetText
http://www.mandragor.org/tutoriels/gettext/3
Compile
msgfmt -o /usr/share/locale/fr/LC_MESSAGES/message.mo message.po
SSH
Échange de clé
Si pas encore fais (crée le fichier ~/.ssh/id_rsa.pub)
ssh-keygen
Puis
cat ~/.ssh/id_rsa.pub | ssh user@dest cat - ">>" /home/user/.ssh/authorized_keys
http://drupal.nieuwerbrug.org/?q=node/66
Port forwarding
ssh -L 63333:localhost:5432 joe@foo.com ssh -L <local port>:<remote address from remote host>:<remote port> <user>@<remote host>
http://www.postgresql.org/docs/8.4/static/ssh-tunnels.html
Copy
cd /source/dir/ tar cf - . | ssh destmach "(cd /dest/dir/ ; tar xf -)"
pour copier à distance.
et bien sûr :
cd /source/dir/ tar cf - . | (cd /dest/dir/ ; tar xf -)
en local.
Ca marche aussi avec dump/restore (sous Linux, mais aussi Solaris, Tru64, etc) :
cd /sourcemp dump 0f - . | (cd /dest/dir/ ; restore xf -)
Debug
run a core file:
gdb ./main ./core
backtrace (bt)
Notification
notify-send -u low -t 10000 Title 'Hello, every body'
SVN
- sets to executable
svn propset svn:executable ON <file>
- better status
svn st|grep -v ^[XP?]|grep -v ^$
GIT
| Etat | HEAD^ | HEAD | index | copie locale |
|---|---|---|---|---|
git clone | ||||
| (0) | v1 | v2 | vide | v2 |
vi|emacs | ||||
| (1) | v1 | v2 | vide | modifié |
git reset --hard # -> (0) git checkout -> (0) git add -p # partiel -> (3) git add # copie loacal -> index | ||||
| (2) | v1 | v2 | modifié | index |
git reset --hard # -> (0) git reset --mixed # -> (1) git commit # -> (4) vi|emacs | ||||
| (3) | v1 | v2 | modifié | modifié |
git reset --hard # -> (0) git diff # diff index - local git diff --cached # diff HEAD - index git checkout # -> (2) git commit # -> (5) | ||||
| (4) | v2 | v3 | vide | v3 |
git reset --hard HEAD^ # -> (0) git reset --mixed HEAD^ # -> (1) git reset --soft HEAD^ # -> (2) vi|emacs | ||||
| (5) | v2 | v3 | vide | modifié |
- Crée une branche
git checkout -b name
- Switch de branche
git checkout name
- Liste les branches
git branch -a
- Récupère un repository
git clone repository [répertoire]
- Modifie le message du dernier commit
git commit --amend
- Commit (local)
git commit -m message
- Versions précédentes
git log
- Pousser la branche dans le repository distant
git push
- Pousser la branche dans une nouvelle branche du repository distant
git push -u origin branche
- Merger une branche dans le master
git checkout master git merge branche
- Récupère les modification du repository distant
git pull --rebase
- Liste de l’état des fichiers
git status
- grep files in git
git grep
- Liste, gestion des repository distant
git remote
- Retrouver en ancienne révision HEAD -> copie locale
git reset --hard revision
- Rebase d'une branche depuis master
git rebase master # follow instructions (use git add to mark a file as merged) git push --force
http://eagain.net/articles/git-for-computer-scientists/
Submodules
- Initialise
git submodule update --init
- Update submodules to last version
# git submodule foreach git checkout master # if wanted git submodule foreach git pull --rebase
- Update submodules to repository
git pull --rebase git submodule update
Fork
- Rebase
git remote add upstream git://github.com/'<owner>'/'<project>'.git git fetch upstream git rebase upstream/master
Sonorisation
Spectroscopic Toolkit
- http://kmt.hku.nl/~pieter/SOFT/ST/html/index.html
- http://www.hitsquad.com/smm/linux/SPECTRUM_ANALYZERS/
XSpectrum
- http://www.hitsquad.com/smm/programs/Sonogram_visible_linux/
- http://www.dfki.de/~clauer/programming.html
- http://www.dfki.de/~clauer/sonogram/
Sonasound (Debian)
veste
http://www.tsr.ch/tsr/index.html?siteSect=311201&sid=7322715&cKey=1166455147000
- Pour la première couche, la couche peau, il vaut mieux bannir le coton qui absorbe trop l'humidité. La laine mérinos est nettement plus performante, ou la fibre synthétique qui offre une bonne régulation thermique.
- sous-vêtement en laine mérinos, qui évacue moins bien l'humidité que le synthétique mais garde mieux la chaleur.
- une polaire
- veste
Régles
- Un Vocabulaire clair tu emploieras.
- Des thermes racistes tu ne diras pas.
- Des propos injurieux tu n’exclameras pas.
- Le respect tu maîtriseras.
- Le rire, l'amusement tu connaîtras !
MEncoder - ffmpeg
http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-enc-libavcodec.html
- MPEG4 en 2 passes
mencoder video.avi -ovc xvid -xvidencopts pass=1 -o /dev/null -vf scale=944:576 mencoder video.avi -oac copy -ovc xvid -xvidencopts pass=2:bitrate=2000 -o video2.avi -vf scale=944:576 ffmpeg -i video2.avi -vcodec copy -acodec aac -ab 128 -ar 44100 -f mp4 video.mp4
- AC3
mencoder video.avi -oac lavc -lavcopts acodec=ac3 -srate 44100 -ovc copy -o video2.avi
- AAC
mencoder video.avi -oac aac -srate 44100 -ovc copy -o video2.avi ffmpeg -i video.avi -vcodec copy -acodec aac -ab 128 -ar 44100 -f mp4 video2.mp4
- MP3
mencoder video.avi -oac mp3lame -srate 44100 -ovc copy -o video2.avi
- FLV
mencoder video.avi -o video.flv -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=100:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=236:144 -vf scale=200:150
mencoder video.avi -o video.flv -of lavf -oac mp3lame -lameopts abr:br=56 -srate 22050 -ovc lavc -lavcopts vcodec=flv:vbitrate=100:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -vf scale=200:150
- X264
mencoder NARUTO_xxx.avi -o NARUTO_xxx_LIGHT.avi -oac copy -ovc x264 -x264encopts pass=1:subq=5:frameref=6:me=3:bitrate=250:4x4mv:8x8dct:psnr:bframes=16:b_pyramid:qcomp=0.8:keyint=500:weight_b:scenecut=0:b_bias=25
mencoder NARUTO_xxx.avi -o NARUTO_xxx_LIGHT.avi -oac copy -ovc x264 -x264encopts pass=2:subq=5:frameref=6:me=3:bitrate=250:4x4mv:8x8dct:psnr:bframes=16:b_pyramid:qcomp=0.8:keyint=500:weight_b:scenecut=0:b_bias=25
- Changement de container
Fonctionne pas Modèle:(:(
mencoder video.avi -oac copy -ovc copy -o video.mp4 -of lavf −lavfopts mp4
Fonctionne Modèle:;)
ffmpeg -i video.avi -vcodec copy -acodec copy -f mp4 video.mp4
- ffmpeg - FLV
http://po-ru.com/diary/bleeding-edge-ffmpeg-on-ubuntu-feisty/
ffmpeg -i video.avi -s 200x150 -ar 22050 -ab 64 -b 256 -r 15 -f flv video.flv
Python
Virtual environment
- # Get a name for the virtual environment
export VE_NAME="a_name"
- # Create the virtual environment
virtualenv --no-site-package "$VE_NAME"
- # Activate it
source "$VE_NAME"/bin/activate
- # Exit the virtual environment
desactivate
Install (tilecache)
- # Install for development (symbolic link)
python setup.py develop
- # Standard install (copy)
python setup.py install
GIS
- verify map file
shp2img -s 800 600 -m file.map
- inspect shp file
ogrinfo file.shp object
- Tiled a geotiff
gdal_translate -of GTiff -co "TILED=YES" utm.tif utm_tiled.tif
- create a tile index
gdaltindex doq_index.shp doq/*.tif
- Projection definitions
/usr/share/proj/epsg
Optimise GeoTiff
find -name *.tiff -print | while read f; do
mv ${f%.tiff}.tiff,_old.tiff} \
&& gdal_translate -of GTiff -co "TILED=YES" -co "TFW=YES" ${f%_old.tiff}{.tiff,.tiff} \
&& gdaladdo --config COMPRESS_OVERVIEW JPEG -r cubic $f 2 4 10 20 40 80 200
done gdaltindex index.shp *.tiff shptree index.shp
Accousique
Formule de Sabine pour le temps de réverbération :
T = 0,16 · (V/A)
Où :
T = temps de réverbération
V = volume de l’espace
A = absorption totale de la pièce = Σ α · S
Où :
S = surface de matériau absorbant
α = coefficient d’absorption acoustique
