Skip to content

Instantly share code, notes, and snippets.

leisure at work

Stefan Höhn dewomser

leisure at work
Block or report user

Report or block dewomser

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:d2d6cc6c5e459def6ee1a19756c874e9
sleep 60
/usr/bin/wget -P /home/foo/falkencam/$(date +%m_%d_%y)
# crontab to get Photo every 5 minutes
#*/5 * * * * /home/foo/bin/
View gist:3873d1ba96a37d277efba7978d86636f
// Beispiel Twurl Tweet mit Bild
// initialisieren mit genauer Byte größe
twurl -H "/1.1/media/upload.json" -d "command=INIT&media_type=image/jpg&total_bytes=2204" | jq
//Das mittlere ist das richtige
"media_id": 1108021296946917400,
dewomser / Verspätungen im Bahnhof Worms
Last active Mar 12, 2019
Das Script lässt sich auf andere Bahnhöfe anpassen. Stadtnamen ändern. und die Nummer hinter Hbf Die Nummer steht im Quelltext der Webseite inputRef
View Verspätungen im Bahnhof Worms
worms="";curl -s -X GET $worms | html2text | grep Grund -C1
View gist:539aad9df6f0cc2635355147378cb83d
URL="";neu=$(wget -l 0 -q $URL -O - | grep -m 1 'title=\"Searchitem\"'| cut -c 19-57);youtube-dl $neu
# Das nach dem |cut gefällt mir noch nicht.
dewomser /
Created Jan 30, 2019
greensnow ufw bash crontab
while read line; do sleep .5;ufw delete deny from $line; done < greensnow.txt
sleep 1
rm greensnow.txt
sleep 1
while read line; do sleep .5;ufw deny from $line to any; done < greensnow.txt
dewomser /
Last active Jan 28, 2019
parse whole folder for valid YAML
readarray -t a < <(ls *.yaml)
for IND in ${!a[@]}; do
ruby -ryaml -e "Psych.parse('$lolo'))"
if [[ $? -ne 0 ]]
echo "$lolo is not valid YAML"
# exit 1
dewomser / beschl4.ino
Created Jan 18, 2019
Arduino Datalogger Acceleration MMA8452Q
View beschl4.ino
SFE_MMA8452Q Library Basic Example Sketch
Jim Lindblom @ SparkFun Electronics
Original Creation Date: June 3, 2014
This sketch uses the SparkFun_MMA8452Q library to initialize the
accelerometer, and stream values from it.
dewomser / gist:83960df7ae0c407c30b447166d3e0680
Last active Jul 2, 2019
Raspberry Pi download hash-check
View gist:83960df7ae0c407c30b447166d3e0680
cd ~/Downloads || exit
#das hier aktivieren für ---Download---
#wget -O
echo shasum aus zipfile wird gerechnet…
sha1=$(shasum -a 256 | grep -o -P "[0-9a-z]{40,}")
sha2=$(curl | grep -o -P "[0-9a-z]{40,}" | head -1)
sleep 10
echo Prüfsumme aus Download "$sha1"
echo Prüfsumme von Webseite "$sha2"
dewomser / gist:d4fc4ba97072df1003cb5a61a534d8b6
Created Sep 26, 2018
simple Cookie Banner in Javascript CSS
View gist:d4fc4ba97072df1003cb5a61a534d8b6
<script type="text/javascript">
document.cookie = "klicker";
function change()
function getCookie(cname) {
var name = cname + "=";
dewomser / Fade1.ino
Created Apr 25, 2017
The file that is currently on an Arduino Diecimila or Duemilanove w/ ATmega168 with a serial number of A600f3S6
View Fade1.ino
This example shows how to fade an LED on pin 9
using the analogWrite() function.
This example code is in the public domain.
You can’t perform that action at this time.