Skip to content

Instantly share code, notes, and snippets.

View yaf's full-sized avatar

Yannick François yaf

View GitHub Profile
@yaf
yaf / convert_flac_to_
Last active August 29, 2015 13:58
Convert flac to mp3/ogg
for f in *.flac;do flac -cd $f |lame -b 128 - $f.mp3;done
for f in *.flac;do flac -cd $f |oggenc $f;done
@yaf
yaf / git-server.sh
Created May 12, 2014 20:37
git server local
git daemon --verbose --base-path=/home/yaf/Code/git_server --enable=receive-pack
@yaf
yaf / deploy
Created December 17, 2014 20:55
A base deploy script
#!/bin/sh
APPNAME="my_app"
BRANCH=`git rev-parse --abbrev-ref HEAD`
DESTINATION="git@appsdeck.eu:$APPNAME-$BRANCH.git"
echo "*** deploy $APPNAME to $DESTINATION"
git pull origin $BRANCH && \
git push origin $BRANCH && \
git commit --date=2.days.ago -m "set in the past" --allow-empty
@yaf
yaf / pngcrush.sh
Created April 4, 2015 21:48
Png Crush
# Daily one-liner
find . -name *.png | parallel -n 1 'pngcrush -rem allb -brute -reduce {} {}.new | grep "filesize" && mv {}.new {}'
@yaf
yaf / UTF-8-demo.txt
Created April 4, 2015 20:35
UTF-8 démo
UTF-8 encoded sample plain-text file
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Markus Kuhn [ˈmaʳkʊs kuːn] <http://www.cl.cam.ac.uk/~mgk25/> — 2002-07-25
The ASCII compatible UTF-8 encoding used in this plain-text file
is defined in Unicode, ISO 10646-1, and RFC 2279.
@yaf
yaf / gist:9fef3b5840a239a8756f
Created April 22, 2015 16:29
add url for push
git remote set-url --add origin git@gitlab.com:...
@yaf
yaf / deploy
Created May 27, 2015 21:11
From a source branch that generate in a _site directory a static web site to a gh-pages branch !
#!/bin/sh
git co gh-pages && git co source:_site -- . && git ci -m 'update site' && git push
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10
git clean -nxd