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/sh | |
BACKUP_DIR=/dir/to/backup | |
SQL_FILE=backup.sql | |
mysqldump --skip-extended-insert --skip-dump-date \ | |
-uuser -ppwd database | | |
grep -v 'INSERT INTO `wp_statpress`' > $BACKUP_DIR/$SQL_FILE | |
rsync -ax /dir/to/wordpress/wp-content/themes/twentyten \ |
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
<html> | |
<head> | |
<META HTTP-EQUIV="Refresh" CONTENT="1"> | |
</head> | |
<body> | |
<img src="warroom.jpeg"> | |
</body> | |
</html> |
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
function groupBy(jsonArray, fun) { | |
return jsonArray.reduce(function(accumulator, object) { | |
var value = fun(object); | |
if (Array.isArray(accumulator[value])) { | |
accumulator[value].push(object); | |
} else { | |
accumulator[value] = [object]; | |
} | |
return accumulator; | |
}, {}); |
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/sh | |
sudo watch -n 1 streamer -s 1280—720 -f jpeg -o /var/www/avsp/warroom.jpeg |
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
-module(mod_http_presence). | |
-behavior(gen_mod). | |
-include("ejabberd.hrl"). | |
-include("jlib.hrl"). | |
-export([start/2, stop/1, on_presence/4]). | |
start(Host, _Opts) -> |
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 |
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
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
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
#!/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 |
OlderNewer