This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# get path of script | |
scriptpath="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | |
# pass exit status to parent shell if anything fails | |
set -eEo pipefail | |
shopt -s inherit_errexit >/dev/null 2>&1 || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# change time offset to HW clock [ms] to -1day | |
VBoxManage modifyvm 'vmname' --biossystemtimeoffset -86400000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hosts by manufacturer | |
arp-scan -l | |
# small http upload server | |
webfsd -F -d -p 55555 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# split all A3 pages into A4 except first and last | |
a=($(ls -d *.pdf)) | |
for f in ${a[@]} ;do | |
[ "${a[1]} " != "$f " ] && [ "${a[-1]} " != "$f " ] && pdfposter -m a4 -p 2x1a4 "$f" "$f.cut" | |
done | |
# rotate +90° (mathematical) and split all pages | |
b=($(ls -d *.cut)) | |
for f in ${b[@]} ;do | |
pdftk $f cat 1-endwest output "$f.pdf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IPv4 is inside a String | |
echo "address is 127.0.0.1 ." | grep -Eo '((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])' | |
# IPv4 string can only be an IPv4-address | |
echo "127.0.0.1" | grep -Eo '^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])$' | |
# replace \n with " " | |
sed ':a;N;$!ba;s/\n/ /g' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ENCODE | |
# AUDIO | |
# upmix stereo to 5.1 | |
ffmpeg -i sound.opus -filter_complex "[0:a]pan=5.1(side)|FL=FL|FR=FR|LFE<FL+FR|FC<0.5*FR+0.5*FL|SL=FL|SR=FR[a]" -map 0 -map -0:a -map "[a]" -c copy -c:a flac output.flac | |
# convert any audio in current dir to mp3 in parallel | |
ls -1 --file-type | parallel --max-args 1 ffmpeg -i "{}" -vn -ar 44100 -ac 2 -b:a 192k "/path/{.}.mp3" | |
# VIDEO | |
# 4k h264/5, practical, small, ok |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Erste Schritte | |
Kommandozeile öffnen und Git konfigurieren: | |
``` | |
git config --global user.name "Vorname Nachname" | |
git config --global user.email "[email protected]" | |
``` | |
Repository clonen: | |
``` |