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 / togif.md
Last active May 1, 2025 18:39
Make gif und gif Manipultion

Mit einfachem Bashkommando zur Gifanimation. Beispiele

1.) jpg2gif mit ImageMagic

convert -resize 640x480 -delay 20 -loop 0 *.jpg myimage.gif

2.) mkv2gif

ffmpeg -i meisencam_06-20250113095337.mkv -r 10 kraehe.gif

@dewomser
dewomser / lotto.sh
Last active April 27, 2025 22:29
Aktuelle Lottozahlen aus dem Netz holen
#!/bin/bash
lz="$(curl -s http://www.ergebnisse.westlotto.de/gewinnzahlen/lottozahlen.rss | grep \<title\>vom)"
echo "${lz:10:-8}"
# vom 23.04.25: 5, 7, 11, 13, 21, 38 S: 1
@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 April 21, 2025 10:57
Toot the local git diff in a specific git repository
#!/bin/bash
#This script is useing "toot" ang "gist". Must be installed
# 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 / =mastotool_statistik.txt
Last active April 1, 2025 09:01
Mastodon Monatsstatistik für @dewomser. Kommando: mastotool stats -r=100
Total toots: 100 (excluding replies & boosts)
Toots per day: 0.04 (account created 2648 days ago)
Ratio toots/replies: 16.67
New followers per day: 0.10
New followings per day: 0.08
Likes per toot: 0.39 (total likes: 39)
Boosts per toot: 0.12 (total boosts: 12)
Replies per toot: 0.14 (total replies: 14)
┌──────────────────────────────┬──────────────┐
@dewomser
dewomser / github_backup,sh
Last active March 31, 2025 17:09
Github Backup . Alle Repositories klonen, Ordner zippen
#!/bin/bash
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