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 / toot_a_photostream.sh
Last active May 14, 2024 03:46
mastodon toot a photostream make and destroy toots in a time intervall
#!/bin/bash
#crontab
#for crontab use always full path or EXPORT
#crontabline : */15 * * * * /home/user_name/bin/stream_ordner/toot_a_photostream.sh >/home/user_name/bin/stream_ordner/error.txt 2>&1
fullpath_dir="/home/foo/bin/stream"
fullpath_toot="/usr/bin/toot"
mkdir -p $fullpath_dir/"$(date +%m_%d_%y)"
source_url="https://webcams.foo_bar.de/Webcam1/webcam/current.jpg"
toottext="Mein Text $(date +%H:%M) . Alle 15 Minuten ein Schnappschuss!"
@dewomser
dewomser / bash-plus-minus-mal
Last active September 10, 2024 11:34
Taschenrechner. Addieren, subtrahieren, multiplizieren und dividieren mit Bash. Ein Einzeiler
# Addiert,Subtrahiert oder Multipliziert GANZE Zahlen.
# Beispiel: 17+4 [ENTER]
read -p "Zahl1[+-*]Zahl2: " z1 a z2;echo "$z1$a$z2=$((z1$az2))"
#
#oder
#
# Addiert,subtrahiert,multipliziert oder dividiert RATIONALE Zahlen.
# Je nach Einstellung der Bashumgebung für Dezimalzahlen ist das Komma ein Punkt
# Beispiel: 17.1+3.9 [ENTER]
read -r -p "Zahl1[+-*/^]Zahl2: " z1 a z2;echo "$z1$a$z2= $(echo "$z1$a$z2" | bc -l)"
@dewomser
dewomser / get_corona_plus_wait.js
Last active May 6, 2020 22:46
Corona table from Wikipedia snapshot
/**
* Wait until the test condition is true or a timeout occurs. Useful for waiting
* on a server response or for a ui change (fadeIn, etc.) to occur.
*
* @param testFx javascript condition that evaluates to a boolean,
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
* as a callback function.
* @param onReady what to do when testFx condition is fulfilled,
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or
* as a callback function.
@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active April 18, 2025 00:09
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default