Skip to content

Instantly share code, notes, and snippets.

View soundstorm's full-sized avatar
😴
never sleeping

Luca Schröder soundstorm

😴
never sleeping
View GitHub Profile
@soundstorm
soundstorm / wp-resalt
Last active February 25, 2023 18:05
Quickly resalt all WordPress installation via Bash Script with no need to install any Addons
#!/bin/bash
SCRIPNAME=$0
function show_help() {
echo "Resalt Wordpress configurations without any plugins."
echo "Usage:"
echo " -f Use specific file to resalt ($SCRIPTNAME -f /var/www/html/wordpress/wp-config.php)"
echo " -d Use wp-config.php in given directory ($SCRIPTNAME -d /var/www/html/wordpress)"
echo " -a Use wp-config.php in all subdirectories of given directory ($SCRIPTNAME -a /var/www/html)"
@soundstorm
soundstorm / aha.py
Last active January 11, 2023 18:57
AHA Hannover MQTT Abholtermine (Abfallwirtschaft Hannover)
#!/usr/bin/python
import re, requests
import paho.mqtt.client as mqtt
import time, datetime
data = {
'gemeinde': 'Hannover',
'strasse': '00590@Burgweg@', # Wert des Dropdowns
'hausnr': '5',
}
@soundstorm
soundstorm / livechatws.py
Last active April 27, 2018 15:56
Public channel for Rocket.Chat without registration
#!/usr/bin/env python
ws_port = 8000 # public [e.g. via proxy]
http_port = 8001 # just locally accessible
guest_identifier = ' [GUEST]'
incoming_url = 'https://example.org/hooks/token'
# First message to websocket will be the username, all afterwards will be sent to all connected WebSocket clients and Rocket.Chat
# Install SimpleWebSocketServer:
@soundstorm
soundstorm / rocketupdate.py
Last active July 12, 2017 10:35
Rocket.Chat Autoupdater written in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Make sure you have set retry=0 in ProxyPass when on apache
rootdir="/opt/"
#folder in rootdir where Rocket.Chat is installed in
rocketdir="Rocket.Chat"
#MongoDB backup, comment if you don't want to backup your db
mongobackup="mongodump --db rocketchat --archive=/backup/mongodb/Rocket.Chat.db.bak --gzip"
#!/bin/bash
# Modified version of http://cacodaemon.de/index.php?id=5
SERVER="dyndns.inwx.com"
USERNAME="hellomynameis"
PASSWORD="secure!!!"
HOSTNAME="example.org"
IPV4=`curl -s http://ipv4.sndstrm.de | grep -o '\([0-9]\{1,3\}\.\)\{3\}[0-9]\{1,3\}'`
IPV6=`curl -s http://ipv6.sndstrm.de | grep -o '\([0-9a-fA-F]\{0,4\}\:\)\{4,7\}[0-9a-fA-F]\{0,4\}'`
@soundstorm
soundstorm / git-badges.html
Created February 6, 2017 13:29
Pure CSS Git-Badges
<html>
<head>
<style>
div.badge {
display: inline-block;
border-radius: .75em;
font-family: 'Dejavu Sans','Arial';
}
div.badge div {
display: inline-block;
@soundstorm
soundstorm / RDWorks Checksum
Created February 2, 2017 14:48
Reverse engineering of RD Works cmd checksum generation
EXAMPLE for MOVE CMD
CMD PAYLOAD
vvvvvvv vvvvvvvvv
89 1a d900020 001010100
^^ ^^
|| Checksum
\_ 0x80 toggles with checksum 0x01
D9 1101 1001
+ 02 0000 0010
@soundstorm
soundstorm / rocketupdate.sh
Last active January 24, 2017 00:14
Rocket.Chat auto-updater
#!/bin/bash
#configure an incoming webhook
SERVER="https://demo.rocket.chat/hooks/TOKEN"
CHANNEL="#rocketchat"
cd /opt
#get most recent version
curl -s -L https://rocket.chat/releases/latest/download -o rocket.chat.tgz
#compare files, you can use it in a cronjob
cmp --silent rocket.chat.tgz.cur rocket.chat.tgz && echo "Rocket.Chat is already up-to-date!" && exit 0