Skip to content

Instantly share code, notes, and snippets.

View AfroThundr3007730's full-sized avatar
πŸ”§
Hacking all the things...

Eddie Carswell AfroThundr3007730

πŸ”§
Hacking all the things...
View GitHub Profile
@AfroThundr3007730
AfroThundr3007730 / report_logger.md
Last active April 8, 2026 03:32
A basic Flask server to receive network reports

Installation steps

  • Make the directory /opt/reports/logs

  • Add configuration to /opt/reports/logger.env

    FLASK_APP=report_logger
    FLASK_RUN_HOST=0.0.0.0
    FLASK_RUN_PORT=5001
@AfroThundr3007730
AfroThundr3007730 / streamlink-save.sh
Last active April 6, 2026 23:17
Save Twitch live streams via streamlink
@AfroThundr3007730
AfroThundr3007730 / gen_services_lookup.md
Created March 27, 2026 00:27
Convert /etc/sevices to CSV lookup file

Convert /etc/sevices to CSV lookup file

out=$SPLUNK_HOME/etc/apps/search/lookups/services.csv
awk 'BEGIN {
        print "port,proto,port_name,port_desc"
    } NR > 1 && $0 !~ /^(#|\s*$)/ {
        split($2, p, "/")
        name=$1
 port=p[1]
@AfroThundr3007730
AfroThundr3007730 / zfs-module-build.service
Last active April 12, 2026 02:32
Build binary zfs-module packages for all kernel packages
[Unit]
Description=Build binary ZFS module packages and publish repo
RequiresMountsFor=/mnt/pool0/data/app /mnt/pool0/mirror/repo
[Service]
Type=exec
Restart=no
TimeoutSec=10
ExecStart=/mnt/pool0/data/app/repo/debian-zfs/bin/zfs-module-build -y
EnvironmentFile=-/mnt/pool0/data/app/repo/debian-zfs/etc/environment
@AfroThundr3007730
AfroThundr3007730 / create-pki-certs.sh
Last active January 13, 2026 15:19
Generating x509 PKI certs inline
#!/bin/bash
config='
[ca_cert]
basicConstraints=critical,CA:true,pathlen:1
authorityKeyIdentifier=keyid:always,issuer
subjectKeyIdentifier=hash
keyUsage=critical,keyCertSign,cRLSign
[sign_cert]
@AfroThundr3007730
AfroThundr3007730 / vod-splice.sh
Last active February 17, 2026 20:47
Splice VOD list via ffmpeg (in remote container)
#!/bin/bash
# Splice VOD list via ffmpeg (in remote container)
set -euo pipefail
shopt -s extdebug
export REMOTE=debsrv01.dm4productions.com
export VOD_DIR=/mnt/pool0/media/archive/twitch
export OHNO=twitch_disconnect_4s.m2t
@AfroThundr3007730
AfroThundr3007730 / fix_json_dates.py
Last active April 8, 2026 03:41
Fixup JSON dates exported by .NET JavaScriptSerializer
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
# For issues or updated versions of this script, browse to the following URL:
# https://gist.github.com/AfroThundr3007730/1ec8a10df9345b337c19363a8094ab04
"""
Fixup JSON dates exported by .NET JavaScriptSerializer
Example input file:
@AfroThundr3007730
AfroThundr3007730 / zfs_autosnap.py
Last active April 8, 2026 03:28
Borg-like ZFS pool snapshot and retention with configurable policies
#!/usr/bin/env python3
# SPDX-License-Identifier: GPL-3.0-or-later
# For issues or updated versions of this script, browse to the following URL:
# https://gist.github.com/AfroThundr3007730/a4c58c13a97cb20a08720eed5d53d4c5
"""Borg-like ZFS pool snapshot and retention with configurable policies"""
__author__ = "AfroThundr"
__modified__ = "2026-04-07"
@AfroThundr3007730
AfroThundr3007730 / 1-vscode-cleanup.sh
Last active May 15, 2025 19:36
vscode profile cleanup tasks
#!/bin/bash
set -euo pipefail
shopt -s extdebug
# Purge extensions cache
rm -fr /vscode{,/vscode-server}/extensionsCache/* \
~/.vscode-{server,remote}/extensionsCache/*
# Remove older extension versions
@AfroThundr3007730
AfroThundr3007730 / bookmarklets.js
Last active February 17, 2026 20:32
Browser bookmarklets
// switch to menlo proxy: πŸ”
javascript:(()=>window.location.replace('https://safe.menlosecurity.com/'+window.location))()
;
// switch to wayback machine: πŸ—ƒοΈ
javascript:(()=>window.location.replace('https://web.archive.org/'+window.location))()
;
// invert the current page: πŸŒ™
javascript:(()=>document.head.insertAdjacentHTML('beforeend','<style>html{filter:invert(1) hue-rotate(180deg)}img{filter:invert(1) hue-rotate(180deg)}</style>'))()
;
// invert the current pdf (pdfJS): πŸ“–