Skip to content

Instantly share code, notes, and snippets.

View ixs's full-sized avatar
👋

Andreas Thienemann ixs

👋
View GitHub Profile
@ixs
ixs / uBlacklist.txt
Created February 19, 2024 13:58
My uBlacklist collection
#
# Tries to filter SEO spam pages which have low content value.
#
*://www.sentinelone.com/*
*://www.airplane.dev/*
*://www.machinelearningplus.com/*
*://www.toptal.com/*
*://sematext.com/*
*://blog.sentry.io/*
*://betterstack.com/*
@ixs
ixs / debug-milter.py
Created February 7, 2024 15:39
A simple milter that will print callbacks and macros to stdout.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
debug-milter.py
A super simple Mail Filter (milter) which will print callbacks and received
macros to stdout as they are sent by the mailserver.
Ideal to understanding what a mailserver is sending to a milter for debugging
purposes.
#!/usr/bin/python3
#
# IPTables Trace parser
# Licensed under GPLv3+ by Andreas Thienemann <andreas@bawue.net>
#
# Takes a tracelog and a connection ID and will display the actual firewall rules
# a packet hits on it's way through the different iptables chains.
#
# Instructions:
# 1. Enable rule to mark packets to trace in the raw table:
#!/bin/bash
#
# Dockerized Mastodon Database Backup Script
#
DIR=$(date +%d-%m-%y)
DEST="./db_backups/$DIR"
mkdir -p "$DEST"
MASTODON_ENV=$(basename "${PWD}")
@ixs
ixs / gist:a8e5da2632ac93d5ec744ca9a3e05f28
Last active September 24, 2021 12:20
PowerDNS crash matrix
pdns-auth-master: works
pdns-auth-45: works
pdns-auth-46: not found
Sep 23 14:11:07 Loading '/usr/local/lib/pdns/libgsqlite3backend.so'
Sep 23 14:11:07 This is a standalone pdns
Sep 23 14:11:07 Listening on controlsocket in '/var/run/pdns/pdns.controlsocket'
Sep 23 14:11:07 UDP server bound to 0.0.0.0:53
Sep 23 14:11:07 UDP server bound to [::]:53
Sep 23 14:11:07 TCP server bound to 0.0.0.0:53
@ixs
ixs / prips.py
Created August 4, 2021 12:57
prips in python - support ipv6
#!/usr/bin/env python3
import ipaddress
import sys
for ip in ipaddress.ip_network(sys.argv[1]).hosts():
print(ip)
@ixs
ixs / ip_finder.sh
Last active August 4, 2021 12:06
IP Finder als kleine Programmierübung
#!/bin/bash
set -euo pipefail
# IP Finder als kleine Programmierübung
NAMED=/var/named/data
NETZ="${1:-}"
if [ -z "$NETZ" ]; then
@ixs
ixs / rocky_os_family.py
Last active July 4, 2021 12:49
Salt custom grain to override os_family grain to ensure Rocky Linux is as part of the RedHat OS family.
#!/usr/bin/env python3
# Override os_family grain to ensure Rocky Linux is seen
# as part of the RedHat OS family.
#
# Similar functionality was added in https://github.com/saltstack/salt/pull/59682
# but has not been released yet.
#
# To install, drop this code into /svc/salt/_grains/ and run
# `salt '*' saltutil.sync_all`
@ixs
ixs / apple_contact_picture_crop.py
Last active January 14, 2021 10:58
Apple iOS compatible image crop for contact/vcard images
#!/usr/bin/env python3
from PIL import Image
import io
import logging
import vobject
import base64
import hashlib
"""
@ixs
ixs / intel_x520_patcher.py
Last active April 25, 2024 07:19
Intel x520 EEPROM Patcher allows to unlock the x520 network card to work with non-intel branded SFP modules.
#!/usr/bin/env python3
#
# Simple Intel x520 EEPROM patcher
# Modifies the EEPROM to unlock the card for non-intel branded SFP modules.
#
# Copyright 2020,2021,2022 Andreas Thienemann <andreas@bawue.net>
#
# Licensed under the GPLv3
#
# Based on research described at https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/