Skip to content

Instantly share code, notes, and snippets.

View dewomser's full-sized avatar
😎
leisure at work

Stefan Höhn dewomser

😎
leisure at work
View GitHub Profile
Total toots: 2572 (excluding replies & boosts)
Toots per day: 2.66 (account created 966 days ago)
Ratio toots/replies: 3.00
New followers per day: 0.15
New followings per day: 0.18
Likes per toot: 0.44 (total likes: 1140)
Boosts per toot: 0.15 (total boosts: 377)
Replies per toot: 0.42 (total replies: 1078)
┌──────────────────────────┬──────────────┐
@dewomser
dewomser / check-video.sh
Created October 10, 2020 13:17
Check for fresh videos in folder. A Bash script uses KDE notify-send
#!/bin/bash
# This shows new Viedoclips. Script is tested with Kubuntu 20.04 and uses notify-send Popup-Window
# edit dl-folder for your needs
#It does not fail if nothing pops up. there was propably no fresh Video in the last 4 hours.
#If you want to be remembered regulary there is this line for your user crontab :
#0 * * * * XDG_RUNTIME_DIR=/run/user/$(id -u) /home/foo/bin/yt-dl-send-notify.sh
@dewomser
dewomser / Arduino 2-Punktregler
Created October 13, 2020 15:13
Parametrierbarer 2-Punktregler mit Hysterese. Test mit Arduino duemill… und Feuchtefühler
/*
Analog input, analog output, serial output
2 Punktregler mit Hysterese
*/
// These constants won't change. They're used to give names
// to the pins used:
const int analogInPin = A0; // Analog input pin that the poti is attached to
@dewomser
dewomser / wetter-worms.sh
Last active April 21, 2024 22:41
Wetter Hochschule Worms
#!/bin/bash
u=$(curl -X 'GET' \
'https://wetter.hs-worms.de/api/v3/data' \
-H 'accept: application/json')
temperatur=$(echo $u|jq ".temperature.out")
vorhersage=$(echo $u|jq '.forecast.rule')
barometer=$(echo $u|jq '.baro')
regenrate=$(echo $u|jq '.rain.rate')
@dewomser
dewomser / search_website.sh
Last active February 24, 2023 21:54
Webseite durchsuchen
# alphsbetisch sortiert
w3m -dump -no-cookie -X https://www'.'worms'.'de/de/suche/?searchTerm=klima | grep -o '\w*[K,k]lima\w*' | sort | uniq -c
# nach Vorkommen sortiert
w3m -dump -no-cookie -X https://www'.'worms'.'de/de/suche/?searchTerm=fahrrad | grep -o '\w*Fahrr[a,ä]d\w*' | sort | uniq -c | sort -gr
@dewomser
dewomser / gist:0b5c3638c3da56f00578165c2d6b2054
Last active August 22, 2023 09:03
Bot liest Frau in Bild
firefox https://www.bild.de/ -P screenshot --screenshot ~/Downloads/bild.png ; tesseract -l deu ~/Downloads/bild.png bild ; grep -E '[F,f]rau' bild.txt
# erweitert . noch mehr Frau
firefox https://www.bild.de/ -P screenshot --screenshot ~/Downloads/bild.png ; tesseract -l deu ~/Downloads/bild.png bild ; grep -E '[F,f]rau|Mädchen|Oma|Uroma|[N,n]utte|Prostituierte|[M,m]utter |[M,m]ama' bild.txt
@dewomser
dewomser / gist:81bd6c534647ef7e8812cb74d528766d
Created May 17, 2021 17:29
Rapideyemovement with xeyes and Arduino Micro
#include <Mouse.h>
// constants won't change. They're used here to set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
//Bash example: xeyes -geometry 200x200+100+100
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
@dewomser
dewomser / modified_by_Bingchat.sh
Last active August 20, 2023 21:07
File last modified today? Bashscript
# Get the last modification time of the file in seconds
last_modified=$(stat -c "%Y" $file)
# Read the previous value from ~/temp/letzter.txt
previous_modified=$(cat ~/temp/letzter.txt)
# Compare the last and previous values
if [ $last_modified -gt $previous_modified ]; then
echo "The file has changed"
else
@dewomser
dewomser / gist:238de24dd6ce476cbed8ab076332b617
Created June 17, 2021 20:11
ESP32 dht11 + sensor for moisture in soil
/*********
Rui Santos
Complete project details at https://randomnerdtutorials.com
Now with sensor for soil-humidity Pin 34
Stefan Höhn
*********/
// Import required libraries
#include "WiFi.h"
#include "ESPAsyncWebServer.h"