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 3, 2024 13:10
mastodon toot a photostream make and destroy toots in a time intervall
!/bin/bash
## crontab suggestion
#for crontab use always full path or EXPORT
#crontabline : */15 * * * * /full/path/toot_a_photostream.sh >/full/path/error.txt 2>&1
## change and check variables from --->
fullpath_dir="/home/foo/bin/stream"
fullpath_toot="/usr/bin/toot"
source_url="https://webcams.lolo.de/Webcam1/webcam/current.jpg"
toottext="your txt $(date +%H:%M) . Every 15 minutes a snapshot!"
@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.