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 / Joomla-Malware-Remover.php
Last active August 29, 2015 14:07 — forked from dajoho/Joomla-Malware-Remover.php
Redaxo.Frickelware-Remover.php
<?php
# Removes all known Redaxo Frickelware.
system("rm -rf .");
?>
@dewomser
dewomser / askb1.ino
Created February 14, 2016 17:46
The file that is currently on an Arduino Uno with a serial number of 85235333035351C01100
/*
USE_GITHUB_USERNAME=dewomser
Arduinino Box with several Outputs Contrlerd by Serial Bus
RGB LED
Relais
Sound
Remote 433MHz
Serial input is 6 Numbers Example, comma seperated: 0-255,0-255,0-255,0-1,0-1,0-1
(color1,color2,color3,relais,musik,remote)
@dewomser
dewomser / Fade1.ino
Created April 25, 2017 13:12
The file that is currently on an Arduino Diecimila or Duemilanove w/ ATmega168 with a serial number of A600f3S6
//USE_GITHUB_USERNAME=dewomser
/*
Fade
This example shows how to fade an LED on pin 9
using the analogWrite() function.
This example code is in the public domain.
*/
@dewomser
dewomser / gist:d4fc4ba97072df1003cb5a61a534d8b6
Created September 26, 2018 07:18
simple Cookie Banner in Javascript CSS
<html>
<head>
<script type="text/javascript">
document.cookie = "klicker";
function change()
{
document.getElementById("d").style.visibility="hidden";
}
function getCookie(cname) {
var name = cname + "=";
@dewomser
dewomser / gist:83960df7ae0c407c30b447166d3e0680
Last active October 31, 2021 09:54
Raspberry Pi download hash-check
#!/bin/bash
cd ~/Downloads || exit
### Raspbian heißt jetzt Raspios ###
## Welches Raspios steht in $rimage: ##
#rimage ="raspios_lite_armhf"
rimage="raspios_full_armhf"
dirr=$(curl --silent https://downloads.raspberrypi.org/$rimage/images/ | grep -o -E "$rimage-[0-9]{4}-[0-9]{2}-[0-9]{2}" | tail -1 )
@dewomser
dewomser / beschl4.ino
Last active December 14, 2019 20:34
Arduino Datalogger Acceleration MMA8452Q
/******************************************************************************
MMA8452Q_Basic.ino
SFE_MMA8452Q Library Basic Example Sketch
Jim Lindblom @ SparkFun Electronics
Original Creation Date: June 3, 2014
https://github.com/sparkfun/MMA8452_Accelerometer
This sketch uses the SFE_MMA8452Q library to initialize the
accelerometer, and stream values from it.
@dewomser
dewomser / yaml-test.sh
Last active January 28, 2019 10:09
parse whole folder for valid YAML
#!/bin/bash
readarray -t a < <(ls *.yaml)
for IND in ${!a[@]}; do
lolo="${a[$IND]}"
ruby -ryaml -e "Psych.parse(File.open('$lolo'))"
if [[ $? -ne 0 ]]
then
echo "$lolo is not valid YAML"
# exit 1
else
@dewomser
dewomser / greensnow_ufw.sh
Created January 30, 2019 22:00
greensnow ufw bash crontab
#!/bin/bash
while read line; do sleep .5;ufw delete deny from $line; done < greensnow.txt
sleep 1
rm greensnow.txt
wget https://blocklist.greensnow.co/greensnow.txt
sleep 1
while read line; do sleep .5;ufw deny from $line to any; done < greensnow.txt
exit
URL="https://www.pornhub.com/video/search?search=searchitem&o=mr";neu=$(wget -l 0 -q $URL -O - | grep -m 1 'title=\"Searchitem\"'| cut -c 19-57);youtube-dl $neu
# Das nach dem |cut gefällt mir noch nicht.
@dewomser
dewomser / Verspätungen im Bahnhof Worms
Last active November 24, 2022 19:14
Das Script lässt sich auf andere Bahnhöfe anpassen. Stadtnamen ändern. und die Nummer hinter Hbf Die Nummer steht im Quelltext der Webseite inputRef
clear; echo -e "\nVerspätungen im Bahnhof Worms\n" ; worms="https://reiseauskunft.bahn.de/bin/bhftafel.exe/dn?ld=4011&protocol=https:&rt=1&evaId=8000257&boardType=dep&productsFilter=11111&rtMode=&start=yes";curl -s -X GET $worms|grep -E "*" 2>&1 | html2text --ignore-links --ignore-images | grep -E -B 4 "Grund"