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
@dewomser
dewomser / tmp.KE654SwwBs
Created April 22, 2025 04:14
Latest commit diff Klimadiagramm
Klimadiagramm
https://github.com/dewomser/Klimadiagramm
------------
diff --git a/klima2.png b/klima2.png
new file mode 100644
index 0000000..561876a
Binary files /dev/null and b/klima2.png differ
@dewomser
dewomser / gitdff2toot.sh
Last active August 16, 2025 00:22
Toot the local git diff in a specific git repository
#!/bin/bash
#This script is useing "toot" ang "gist". Must be installed
# Example Output https://gist.github.com/dewomser/a2a380f692d919e2f2f85ffb040ecc9b
# Variables
REPO_NAME="Hello_world"
REPO_REMOTE_ROOT="https://github.com/foo"
REPO_DIR="/home/fpp/git/$REPO_NAME"
GIST_DESCRIPTION="Latest commit diff $REPO_NAME"
GIST_FILENAME="diff.txt"
MASTODON_MESSAGE="Check out the latest commit diff: $REPO_NAME"
@dewomser
dewomser / tmp.vEXscs1wy7
Created April 21, 2025 08:16
Latest commit diff Klimadiagramm
Klimadiagramm
https://github.com/dewomser/Klimadiagramm
------------
diff --git a/klima.csv b/klima.csv
index cd3fe2a..e69de29 100644
--- a/klima.csv
+++ b/klima.csv
@@ -1,115 +0,0 @@
-station_id,dataset,parameter,date,value,quality,station_id,dataset,parameter,date,value,quality
-05692,climate_summary,temperature_air_mean_200,1896-01-01T00:00:00+00:00,282.88,5.0,05692,climate_summary,precipitation_height,1896-01-01T00:00:00+00:00,479.0,5.0
@dewomser
dewomser / bash_menue.sh
Created April 20, 2025 04:09
Einfaches Menue-Skript für Bash in Bash . Kommandos starten über Eingabe von Zahlen
#!/bin/bash
# Menue für Bash in Bash. Kommandos staerten mit Zahlen
# Liste von Befehlen
commands=("ls -rtl" "ssh [email protected]" "htop" "history" "cmatrix" "calendar" "neofetch" "ping 192.168.1.1" "toilet" "bpytop" "asciiquarium" "cowsay lolo")
# Hauptmenüschleife
while true; do
echo "Wähle einen Befehl aus der Liste aus:"
@dewomser
dewomser / countdown.sh
Last active April 19, 2025 02:36
Make an audio countdown for bash espeak and ffmpeg
#!/bin/bash
# make countdown
espeak -v en-us -g60 -p75 -w countdown1.wav " 10 9 8 7 6 5 4 3 2 1 0"&& espeak -v en-us -w countdown2.wav "We have a lift off !"
# make a list
echo "file 'countdown1.wav'" > filelist.txt
echo "file 'countdown2.wav'" >> filelist.txt
# stitch together
ffmpeg -f concat -safe 0 -i filelist.txt -c copy countdown.wav
@dewomser
dewomser / bash_color.txt
Last active April 8, 2025 12:29
Bash wird Bunt .Escapesequenzen für Menschen. Geeignet für .bashrc
##############################################################################
# COLORS AND BACKGROUNDS
##############################################################################
# note: \e or \x1B also work instead of \033
# Reset
Color_Off='\033[0m' # Text Reset
# Regular Colors
Black='\033[0;30m' # Black
Red='\033[0;31m' # Red
@dewomser
dewomser / github_backup,sh
Last active October 23, 2025 07:59
Github Backup . Alle Repositories klonen, Ordner zippen
#!/bin/bash
# $GIST_TOKEN und mein_username muss angepasst werden !
datum="gitub_backup_$(date +%y_%m_%d_%H)"
mkdir $HOME/$datum
cd $HOME/$datum
# die Curl-Zeile hann auch als 1-Zeiler benutzt weden.
curl --header "Authorization: 'token' '$GIST_TOKEN'" -L "https://api.github.com/users/Dein_Username/repos?per_page=100&page=1" | jq '.[] .clone_url'|xargs -n1 -r git clone
cd
tar -czvf $datum.tar.gz $datum
# rm -f -r $datum
@dewomser
dewomser / Das_Haus_vom_Nikolaus.turtle
Created March 17, 2025 18:13
Beispiel für Logo als Kturtle mit deutschem Zeichensatz und Syntax
kturtle-script-v1.0
@(reset)
@(gox) 300
@(goy) 350
@(forward) 200
@(turnleft) 45
@(forward) 141
@(turnleft) 90
@dewomser
dewomser / OCR2Clipboard.sh
Last active September 1, 2025 12:19
From Screenshot to OCR to Klipper
#!/usr/bin/bash
# KDE,spectacle and tesseract is required
# spectacle After scanarea is open, press Enter.
# works with Wayland
# Look at your clpboard for scanned text
tmpfile_png=$(mktemp /tmp/lolo.XXXXXXXXX --suffix .png)
spectacle -r -n -b -d 5000 -o "$tmpfile_png"
text="$(tesseract $tmpfile_png - -l deu)"
@dewomser
dewomser / lottoschein-bunt1.sh
Last active April 25, 2025 18:05
Lotto 6 aus 49 Gibt random ausgefülltes Kästchen zurück als Bashskript
#!/bin/bash
#test
#Copilot hat bei diesem Skript geholfen
# Generiere sechs zufällige Zahlen im Bereich von 1 bis 49
lotto_numbers=$(shuf -i 1-49 -n 6)
# Sortiere die Zahlen der Reihe nach
sorted_numbers=$(echo $lotto_numbers | tr ' ' '\n' | sort -n)