telegram | channel linux console scripting setup

install telegram-send on mobile phone: create a public channel + get the url create a bot by talking to botfather + get the apikey (the leading number is part of the key) make your bot a channel admin run # telegram-send –config ~/.config/telegram-send-MYCHANNEL.cfg –configure-channel https://github.com/rahiel/telegram-send https://core.telegram.org/bots/api#formatting-options printf “huhu \U0001F4A8\n\U0001F4A7” | telegram-send –disable-web-page-preview –config ~/.config/telegram-send.conf –format […]

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

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