View parentHeight.js
var parentHeight = $.map($('.parent > *'), function (i) { | |
return ($(i).height()) | |
}).reduce(function (accumulator, currentValue) { | |
return accumulator + currentValue; | |
}, 0); | |
$('.parent').height(parentHeight); |
View ostseezeitung-plus.sh
function oz { | |
# bash> oz "https://www.ostsee-zeitung.de/Nachrichten/MV-aktuell/MV-plant-kompletten-Corona-Lockdown-in-wenigen-Tagen" | |
echo "{ $(curl -s "$1" | grep -o '\"description\":\".*')" | jq .articleBody | |
} |
View Google Meet Focus And Toggle Mic
xdotool search --name 'Meet' | xargs xdotool windowactivate;sleep 0.2; xdotool key Ctrl+d |
View record_mp3_and_split.sh
# record from soundcard | |
parec -d 1 | lame -r -V0 - my.mp3 | |
# split file by silence | |
ffmpeg -i my.mp3 -af silencedetect=noise=-30dB:d=0.5 -f null - 2>&1 | grep silence_end | cut -d" " -f 5 | xargs -L 2 | nl | xargs -l bash -c 'ffmpeg -i my.mp3 -acodec copy -ss $1 -to $2 my$0.mp3' |
View pycheck.sh
function pycheck() { | |
echo | |
echo | |
echo | |
find . -name "*.py" | xargs mypy --ignore-missing-imports | |
echo | |
echo |
View imagediff.sh
#!/bin/bash | |
# TODO: Add Readme | |
# TODO: Add Example | |
# TODO: Check if imagemagick is installed | |
IMG_A="$1" | |
IMG_B="$2" | |
convert "$IMG_A" "$IMG_B" <(compare "$IMG_A" "$IMG_B" -) +append - | display |
View Abfall_LRO_iCal_Api.sh
curl 'https://www.abfall-lro.de/wp-content/themes/abfall_lro/ical.php?letters=B_K_D_P&year=2018&black=4w&green=&yellow=y&blue=y' |
View vcy
#!/bin/bash | |
# v - VLC Player | |
# c - chromecast | |
# y - youttube-dl | |
CHROMECASTIP="192.168.178.39" | |
STREAMURI="$1" | |
CERTDIR="$HOME/.vcy" | |
mkdir -p "$CERTDIR" |
View yt2mp3.sh
#!/bin/bash | |
# Example: $ yt2mp3 "https://www.youtube.com/playlist?list=PL63F1E17EE312CC7D" | |
function yt2mp3 () { | |
youtube-dl -i -t --extract-audio --audio-format mp3 "$1" | |
} |
View randomStress.sh
#!/bin/bash | |
echo "Start random stress" | |
while true; do | |
RANYES=$[ ( $RANDOM % 4 ) + 1 ] | |
RANSTR=$[ ( $RANDOM % 300 ) + 1 ]s | |
RANSLEEP=$[ ( $RANDOM % 3000 ) + 1 ]s | |
echo "Start $RANYES proccess for $RANSTR seconds" | |
c=1 |
NewerOlder