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. […]

ejabberd | MUC problems // 17.04

Problem: You add a room with ejabberdctl. # ejabberdctl create_room testroom conference.xmpp.inbbradio.de localhost You list all rooms with ejabberdctl. # ejabberdctl muc_online_rooms global You delete a room. # ejabberdctl destroy_room testroom conference.xmpp.inbbradio.de You list all rooms with ejabberdctl. # ejabberdctl muc_online_rooms global You restart ejabberd # ejabberdctl restart You list all rooms with ejabberdctl. # […]

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 […]