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 / gist_backup.sh
Created February 20, 2026 09:27
Backup all your Gists . Clone to local
#!/bin/bash
# Script to pull GitHub gists
# Based on the functional model in models/gist-backup.sh
# Configuration
GITHUB_USERNAME="foo"
# Path to backup directory (change this to your preferred location)
BACKUP_PATH="/home/foo/github-gists-backup-$(date '+%Y-%m-%d-%H')"
GITHUB_TOKEN="$GIST_TOKEN"
#echo $GITHUB_TOKEN
# Max length for folder name prefix (from file name)
@dewomser
dewomser / cat2miau.md
Last active February 16, 2026 16:44
cat2miau Bash enhencement for reading in Textfile with cat

Der CAT-Ersatz zum lesen von Textdateien ist MIAU !

Diese Funktion => .bashrc

miau() {
  printf '%s' "$(<"$1")"
}

in das Script

@dewomser
dewomser / tage_bis_ostern.sh
Last active February 2, 2026 11:08
soviele Tage bis Ostern
#!/bin/bash
# Get today's date in seconds since epoch
today=$(date +%s)
# Get Easter date in YYYY-MM-DD format using ncal -e
#easter_date=$(ncal -e | awk '{print $NF}')
# Convert Easter date to seconds since epoch
# easter=$(date -d "$easter_date" +%s 2>/dev/null)
@dewomser
dewomser / gist-search.md
Last active January 27, 2026 11:56
Meine Gist durchsuchen mit Browser Formular

Die Webseite besteht nur aus Html und Javascript. Geprüfter Vibecode Suche

Liebhaber der Bash suchen gerne auch so Repositories und Gists

@dewomser
dewomser / lyrics_johnny_cash.txt
Last active January 22, 2026 17:17
API für Lyrics ohne Anmeldung und token Beispiel,
https://lrclib.net/api/search?track_name=family+bible&artist_name=johnny+cash&album_name=the+best+of+Johnny+Cash
@dewomser
dewomser / website_download_as_html.sh
Created January 22, 2026 15:53
Komplette Website downloaden mit Bash 1-Zeiler Festplattenversion
#!/usr/bin/bash
# Es empfiehlt sich vorher einen Ordner anzulegen,
wget --mirror --convert-links --adjust-extension --page-requisites --no-parent https://google.com -P site
@dewomser
dewomser / mastodon_followers_kg_no_pyvis.py
Last active January 22, 2026 15:55
Followers Knowledgegraph on mastodon? . Token is obligatory . Depth =2 . Avatar Images as the nodes. python
#!/usr/bin/env python3
"""
--------------This Script is vibe Code ---------------
mastodon_followers_kg_no_pyvis.py
Build a knowledge graph of a Mastodon account's followers up to a given depth,
using avatar images as node icons. Writes a standalone HTML using vis.js (no pyvis/Jinja2).
Example:
export MASTODON_TOKEN="..." alternativ use --token
@dewomser
dewomser / github_suchen.md
Last active January 22, 2026 14:24
Suchen in Github repositories und in Gist jeweils als Bash-1-liner

Github Gist durchsuchen und Ergebnis auflisten.

In diesem speziellen Fall sind das meine 2oo Gists. Gesucht wird nach "bash".

Es wird kein Token benötigt.

Es ist mal wieder ein 1-Zeiler geworden:

curl -s -L "https://api.github.com/users/dewomser/gists?per_page=200&page=1"| jq '.[]|select(.description|index("bash"))|{filename: .files.[].filename , html_url: .html_url, description: .description}'

@dewomser
dewomser / ddg.txt
Created December 22, 2025 22:17
Suchen in ddg als Bash 1-liner Ergebnisse 1-9
w3m -dump "https://duckduckgo.com/?t=h_&q=wetter+Worms" |grep -3 ^[1-9]
@dewomser
dewomser / ff_default.md
Created December 19, 2025 15:06
Firefox default Profil (das aktuell benutzte) Bashkommando Einzeiler

Firefox default Profil (das aktuell benutzte)

profile="$(grep -m 1 ^Default= -i ~/.mozilla/firefox/profiles.ini)" | echo ${profile#Default=}

Mensch bekommt die Infos besser so : about:profile