Skip to content

Instantly share code, notes, and snippets.

View sarnau's full-sized avatar

Markus Fritze sarnau

View GitHub Profile
@sarnau
sarnau / network_media.sh
Created March 1, 2025 01:27
SwiftBar plugin to show the current actual Ethernet connection speed. I had issues with it falling back to 100MBit, instead of 1GBit
#!/usr/bin/env bash
# <xbar.title>Network Media</xbar.title>
# <xbar.version>v1.0.0</xbar.version>
# <xbar.author>Markus Fritze</xbar.author>
# <xbar.author.github>sarnau</xbar.author.github>
# <xbar.desc>Displays the used media for an Ethernet connection.</xbar.desc>
# <xbar.dependencies>ifconfig</xbar.dependencies>
MEDIA=$(ifconfig -a | grep -o -i "\\d\+g\?base\-T")
@sarnau
sarnau / loadLoxoneMiniserverStatistics.py
Created April 13, 2019 19:11
Download statistics from a Loxone Miniserver
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import struct
import ftplib
import datetime
import sys
loxoneMiniServerIP = '192.168.178.200' # IP address of the Loxone Miniserver
adminUsername = '<<ADMIN USER>>'
@sarnau
sarnau / gist:0b3a4a1e4a2efe96f786dcb72ac91288
Created September 5, 2018 10:19
Star Money 2 (macOS) accessing the encrypted database
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import keychain
import codecs
from pysqlcipher import dbapi2 as lite
// Stadtreinigung Hamburg Abfuhrkalender
// von Markus Fritze, [email protected]
// Version: 30.07.2018
//
// Ausgänge:
// TQ1: Welche Tonnen werden am nächsten Termin abgeholt
// TQ2: Volltext "In xyz Tagen: tonne1, tonne2, ..."
// AQ1: In wieviel Tagen wird TQ1 (siehe oben) abgeholt (0 = Heute)
// Die folgenden Eingänge geben an in wieviel Tagen die jeweilige Müllsorte
// abgeholt wird. Achtung: regelmäßig wird mehr als eine Sorte am Tag abgeholt!
@sarnau
sarnau / LoxCC Parser.py
Last active December 3, 2020 07:46
How to decompress a Loxone sps0.LoxCC File
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import struct
import ftplib
import zipfile
import StringIO
loxoneMiniServerIP = '192.168.178.255' # IP address of the Loxone Miniserver
adminUsername = '<ADMIN_USERNAME>'