Skip to content

Instantly share code, notes, and snippets.

URL_HTML=$1
OUT=$2
if [ "x$URL_HTML"="x" || "x$OUT"="x" ]
then
echo "$0 html outfile"
exit 1
fi
ls *.txt | xargs.exe -I{} sh -c "tail -f {} | sed 's/\(.*\)/{} \1/g' &"
@npeters
npeters / .boto
Created April 1, 2014 21:45
EC2, fabric et les tag
[Credentials]
aws_access_key_id = -----
aws_secret_access_key = ------
[Boto]
ec2_version = 2012-12-01
ec2_region_name = eu-west-1
@npeters
npeters / encode.sh
Created August 3, 2014 13:36
Encode MOV to mp4
IFS=$(echo -en "\n\b")
echo > bash_encode.bat
for f in `find -type f -name '*.MOV'`;
do
SRC=`cygpath -wa $f`
ARCHIVE_TMP=$(dirname $(echo $f | sed 's#\./#../archives/#g'))
ARCHIVE=$(cygpath -wa $ARCHIVE_TMP)
DST=$(echo $SRC | sed 's/MOV/mp4/g')
if [ ! -f $DST ]
then
@npeters
npeters / haproxy.cfg
Last active August 29, 2015 14:06
HaProxy Config
global
log 127.0.0.1 local1 notice
#chroot /var/lib/haproxy
user haproxy
group haproxy
# daemon
stats socket /var/run/haproxy_${ENV}.sock mode 600 level admin
defaults
log global
@npeters
npeters / nginx.conf
Last active August 29, 2015 14:13
nginx router
# map http://nginx.org/en/docs/http/ngx_http_map_module.html#map
# dns https://www.jethrocarr.com/2013/11/02/nginx-reverse-proxies-and-dns-resolution/
# http://www.senginx.org/en/index.php/Dynamic_DNS_Resolve
events {
worker_connections 4096; ## Default: 1024
}
http {
index index.html index.htm index.php;
@npeters
npeters / JVM Env
Last active August 29, 2015 14:16
Conf de log pour l'Oracle Driver ojdbc6_g.jar
-Doracle.jdbc.Trace=true -Djava.util.logging.config.file=/app/jboss/server/PFSERV_BO01/OracleLog.properties
@npeters
npeters / gist:3b45417489565f17332a
Created March 31, 2015 22:03
Console cusor move
C-xC-e editor
Ctrl + A or Home Moves the cursor to the start of a line.
Ctrl+ E or End Moves the cursor to the end of a line.
Esc + B Moves to the beginning of the previous or current word.
Ctrl + K Deletes from the current cursor position to the end of the line.
Ctrl + U Deletes from the start of the line to the current cursor position.
sudo apt-get -y install git-core gitg gedit gedit-plugins gparted bleachbit gnome-do
curlp 'p1-hapi-catalogsearchb01:9200/xwing*/_search?q=idKey:ANT_1172431_57&fields:_id&size=500' | jq '.hits.hits[]._source