Amazon S3 | s3cmd console tool

Do some setup stuff: s3cmd –configure HINTS: When you are asked for the s3 endpoint, use your hosts (canonical) address YOURHOST instead of s3.amazonaws.com When asked for DNS-style bucket+hostname:port don’t use the suggested %(bucket)s.YOURHOST. Instead specify your bucket like YOURBUCKETs.YOURHOST. Mind the ‘s’ appended to YOURBUCKET! Your credentials and settings will be stored in .s3cmd. […]

ffmpeg | mixing tracks volume problem

amix parameter decreases volumes of each input track to avoid clipping of the result track. Try this to prevent this behaviour: ffmpeg -y -i payload.mp2 -i bed.mp2 -filter_complex “[0]volume=2[a];[1]volume=2[b];[a][b]amix=inputs=2:duration=shortest:dropout_transition=0” payload_plus_bed.mp2

BASH | URLENCODE

For each character in string do # IN=”\\”;printf -v OUT ‘%%%02x’ “‘$IN”; echo $OUT or # echo “this & that” | perl -MURI::Escape -ne ‘chomp;print uri_escape($_),”\n”‘

Linux | bash | script | i am running self test

Linux: # FLOCK STUFF PIDFILE=/var/run/$(basename $0) exec 100>$PIDFILE flock -n 100 || exit 1 echo $ > $PIDFILE # … your code … test -r $PIDFILE && rm -f $PIDFILE FreeBSD: Install flock Other BSD: THATSME=”$(ps wwaux | grep -w $ | grep -v grep | awk ‘{$1=$2=$3=$4=$5=$6=$7=$8=$9=$10=””;print $0}’ | sed ‘s|^\s*||’)” && ps wwaux […]