Skip to content

Instantly share code, notes, and snippets.

View 7omg's full-sized avatar
🫧

Tom Gaimann 7omg

🫧
View GitHub Profile
#!/usr/bin/env python3
# Generic python script that notifies the user via ntfy
# if it crashes or misbehaves. Also prevents multiple running
# instances.
import argparse
import fcntl
import sys
import time
#!/bin/sh
# This script is a workaround for a bug that exists
# in Tor since at least 2022. The bug causes the relay to not
# automatically update its IPv6 address, if the server
# is behind a NAT with dynamic IPv6 prefix.
#
# Related discussion: https://forum.torproject.org/t/ipv6-with-dynamic-prefix-behind-nat/5296
#
# The script should only be used as a parameter of `postscript=`
@7omg
7omg / rewp.sh
Created January 2, 2024 19:39
Microsoft Excel 2007+ write protection remover
#!/bin/sh
# Script to remove the write protection from all worksheets
# in an excel `.xlsx` file.
#
# DISCLAIMER: I tested this script with a single file on an arch linux system. The
# type of the file before and after editing is 'Microsoft Excel 2007+'. Check this
# first with `file table.xlsx`!
#
# The process of removing the write protection is really simple and looks like the following: