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:3873d1ba96a37d277efba7978d86636f
Created March 20, 2019 06:18
Twitter+ Twurl Tweet mit Bild
// Beispiel Twurl Tweet mit Bild
// initialisieren mit genauer Byte größe
twurl -H upload.twitter.com "/1.1/media/upload.json" -d "command=INIT&media_type=image/jpg&total_bytes=2204" | jq
//Das mittlere ist das richtige
{
"media_id": 1108021296946917400,
@dewomser
dewomser / gist:d2d6cc6c5e459def6ee1a19756c874e9
Created April 10, 2019 21:54
Webcam grab Photos Bashscript
#!/bin/bash
sleep 60
/usr/bin/wget -P /home/foo/falkencam/$(date +%m_%d_%y) http://falken3-webcam.worms.de/webcam/current.jpg
# crontab to get Photo every 5 minutes
#*/5 * * * * /home/foo/bin/falkencam.sh
### Keybase proof
I hereby claim:
* I am dewomser on github.
* I am dewomser (https://keybase.io/dewomser) on keybase.
* I have a public key whose fingerprint is DD17 340A 93E0 906B 941A 47BF B906 747A 55A1 3AFE
To claim this, I am signing this object:
@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.
@dewomser
dewomser / screenshot for X and Wayland and toot a website
Last active November 1, 2023 15:55
Makes a screenshot in a Website, copies the URL , add own Text and put it on Mastodon toot !
#!/bin/bash
# enable for X
# import "$HOME"/bin/kdialog/toot.png
# enable or Wayland
spectacle -b -r -o "$HOME"/bin/kdialog/toot.png
wait
a=$(kdialog --textinputbox "Dialog-Tooter" "$1")
if [[ $? = 0 ]]; then
echo "$a"
@dewomser
dewomser / test_ma_url.sh
Created May 20, 2020 17:02
test_ma_url.sh
#!/bin/bash
me="untergang.de"
echo "Verzeichnisse, bei denen das Directory Listing aktiv ist:"
links "https://www.google.com/search?channel=fs&q=site:$me%20intitle:index.of"
echo "Vergessene oder ungeschützte Konfigurationsdateien:"
http://relay.181.fm:8072
http://relay.181.fm:8042
http://mp3channels.webradio.antenne.de/antenne
http://st03.dlf.de/dlf/03/128/mp3/stream.mp3
http://hr-hrinfo-live.cast.addradio.de/hr/hrinfo/live/mp3/128/stream.mp3
http://188.94.97.90/rockland.mp3
http://swr-swr3-live.cast.addradio.de/swr/swr3/live/mp3/128/stream.mp3
@dewomser
dewomser / blumentopf-plus.ino
Last active August 9, 2020 16:40
Arduino Blumentopf mit Buzzer
/*
Analog input, analog output, serial output
Reads an analog input pin, maps the result to a range from 0 to 255
and uses the result to set the pulsewidth modulation (PWM) of an output pin.
Also prints the results to the serial monitor.
The circuit:
* potentiometer connected to analog pin 0.
Center pin of the potentiometer goes to the analog pin.
@dewomser
dewomser / blumentopf-pus parametrierbarsss
Last active August 11, 2020 17:19
Blumentopf Plus parametrierbar
/*
Analog input, analog output, serial output
Reads an analog input pin, maps the result to a range from 0 to 255
and uses the result to set the pulsewidth modulation (PWM) of an output pin.
Also prints the results to the serial monitor.
The circuit:
* potentiometer connected to analog pin 0.
Center pin of the potentiometer goes to the analog pin.
Usage: gist [-o|-c|-e] [-p] [-s] [-R] [-d DESC] [-u URL]
[--skip-empty] [-P] [-f NAME|-t EXT]* FILE*
gist --login
gist [-l|-r]
--login Authenticate gist on this computer.
-f, --filename [NAME.EXTENSION] Sets the filename and syntax type.
-t, --type [EXTENSION] Sets the file extension and syntax type.
-p, --private Makes your gist private.
--no-private