This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// pour memoire | |
App = Ember.Application.create(); | |
var marks = [ | |
{id: '1', title: 'barreverte', url: "http://barreverte.fr"}, | |
{id: '2', title: 'leanagilecamp', url: "http://leanagilecamp.fr"}, | |
{id: '3', title: 'ansamb', url: 'http://www.ansamb.com'} | |
]; | |
App.Router.map(function () { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git archive --remote=<url_repo> <branche> [<chemin>] | tar xvf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from multiprocessing.process import Process | |
import time | |
import redis | |
def pub(myredis): | |
for n in range(10): | |
myredis.publish('channel','blah %d' % n) | |
time.sleep(5) | |
def sub(myredis, name): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int calculepalier(StringBuffer buffer, int chiffre, Chiffre chiffreCourant, Chiffre precedent) { | |
int nombrePalier = chiffre / chiffreCourant.chiffreArabe; | |
for (int i = 0; i < nombrePalier; i++) { | |
if (chiffre >= chiffreCourant.chiffreArabe) { | |
buffer.append(chiffreCourant.name()); | |
chiffre -= chiffreCourant.chiffreArabe; | |
} | |
} | |
if (chiffre == chiffreCourant.chiffreArabe - precedent.chiffreArabe) { | |
buffer.append(precedent.name()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package bam; | |
import static bam.ChiffreRomain.Chiffre.*; | |
import static java.lang.Math.abs; | |
import static java.util.Arrays.asList; | |
public class ChiffreRomain { | |
public final String chiffreRomain; | |
enum Chiffre { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ORIGINAL=$1 | |
mv $ORIGINAL/$ORIGINAL.jpg $ORIGINAL/cover.jpg | |
ALBUM_PATH=`echo $ORIGINAL | awk -F '-' '{print $1"/"$2}'` | |
mkdir -p "$ALBUM_PATH" | |
mv $ORIGINAL/* "$ALBUM_PATH/" | |
rmdir $ORIGINAL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MP3=music.mp3 | |
ffmpeg -loop_input -vframes `mp3info -p "%S" $MP3` -r 1 -f image2 -i cover.jpg -i $MP3 -ab 128k video.avi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ID=`xinput list | grep TypeMatrix | grep keyboard | sed 's/.*id=\([0-9]*\).*/\1/'` && setxkbmap -device $ID dvorak -option compose:ralt | |
# mapping insert on mail key | |
xmodmap -e 'keycode 163=Insert' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ( setxkbmap -query | grep fr > /dev/null ) | |
then setxkbmap us -option compose:ralt | |
else setxkbmap fr -option "" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# prefix is CTRL-B and CTRL-X | |
set -g prefix C-b,C-x | |
# enable CTRL-B and CTRL-X under other programms (like vim) - you'll have to press twice le combination to have the ancien one | |
bind C-b send-prefix | |
bind C-x send-prefix | |
# UTF-8 | |
set-option -g status-utf8 on | |
set-window-option -g utf8 on |