Skip to content

Instantly share code, notes, and snippets.

@npeters
npeters / gist:7671982
Created November 27, 2013 07:37
git config
[gc]
auto = 1
[user]
email =
name = npeters
[alias]
st = status
ci = commit
br = branch
co = checkout
@npeters
npeters / gist:7672114
Created November 27, 2013 07:56
git command
git ls-files --other --exclude-standard
~/bin/git-st-mvn.sh
moduleList=$(git st | grep src | sed "s/#//" | sed "s/.*://" |sed "s/\s//g" | egrep -o .*src | awk '{print substr($_,0,length($_)-4)}' | sort | uniq)
echo $moduleList | sed "s/ /,/g"
ou
moduleList=$(git st | grep src | sed -r "s/^#.*:\s*(.*)\/src.*/\1/g")
echo $moduleList | sed "s/ /,/g"
@npeters
npeters / gist:7826852
Created December 6, 2013 15:44
Valider le format d un xml
xmllint.exe --format --noout pom.xml
@npeters
npeters / gist:7910898
Created December 11, 2013 14:02
tig config
[tig]
line-graphics = ascii
show-author = abbreviated # Show abbreviated author names.
show-date = local # Show relative commit date.
show-rev-graph = yes # Show revision graph?
show-refs = yes # Show references?
commit-order = topo # Order commits topologically
read-git-colors = no # Do not read Git's color settings.
show-line-numbers = no # Show line numbers?
line-number-interval = 2 # Interval between line numbers
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 / install-instance.sh
Last active June 16, 2020 07:42
Setup Yum Repo
# script instance
echo 172.23.113.5 vod-rpm >> /etc/hosts
sed -i 's/name=/enabled=0\nname=/g' /etc/yum.repos.d/*.repo
#add repo
cat << EOF > /etc/yum.repos.d/vod-centos6.repo
[VodCentos6-Repository]
name=Vod Centos6 - Local
baseurl=http://vod-rpm/centos6/Packages
@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 / progressbar.sh
Created August 9, 2014 19:32
Progress bar sh
echo -ne '##### (33%)\r'
sleep 1
echo -ne '############# (66%)\r'
sleep 1
echo -ne '####################### (100%)\r'
echo -ne '\n'