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 / ubuntu-universe-package-analysis.sh
Last active February 17, 2026 20:31
A quick analysis of the package composition of the Ubuntu Noble Numbat (24.04) universe repository
#!/bin/bash
# 2024-04-16
# Note: Current size of noble/universe is 145G,
# while all of noble is 170G.
# Downloaded ubuntu noble universe package list
gunzip Packages.gz
# Extracted package names
awk '/Package:/ {print $2}' Packages > Packages.names
@AfroThundr3007730
AfroThundr3007730 / Rocky_8_STIG_notes.md
Last active November 11, 2024 21:20
Notes on getting Rocky 9 and Ubuntu 24.04 compliant with DISA STIGs

Rocky 8 STIG notes

Red Hat Enterprise Linux 8 Security Technical Implementation Guide :: Version 1, Release: 14 Benchmark Date: 24 Apr 2024

Updated on 2024-07-02

Utilities

All fix and check commands must be run as root.

@AfroThundr3007730
AfroThundr3007730 / note_on_licensing.md
Last active March 30, 2024 23:37
A note on licensing

A note on licensing

Unless otherwise specified, any public code, document, snippet, or file posted on my GitHub profile or Gists page, is released under the GNU GPL, Version 3.0 or later.

I'm not going to necessarily remember to tag all of my files with a license. So in the absense of one, the above statement holds true.

@AfroThundr3007730
AfroThundr3007730 / utils.common.bash
Last active June 27, 2026 02:14
Collection of utility functions for bash scripts
#!/bin/bash
# Collection of utility functions for bash scripts
# Version 0.11.0 modified 2026-06-26 by AfroThundr
# 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/b761bd1a6b2f32a2e97727c7e049e354
# Take caution sourcing this file in your shell, as it uses strict mode.
#----------------------------------------------------------------------#
@AfroThundr3007730
AfroThundr3007730 / dce-dload.sh
Last active March 30, 2024 23:18
Wrapper around DiscordChatExporter for automatic channel media archiving
#!/bin/bash
# Wrapper around DiscordChatExporter for automatic channel media archiving
# SPDX-License-Identifier: GPL-3.0-or-later
dce.set_globals() {
AUTHOR='AfroThundr'
BASENAME="${0##*/}"
MODIFIED='20240304'
VERSION='0.3.1'
@AfroThundr3007730
AfroThundr3007730 / ddclient.service
Last active December 16, 2025 04:20
Lightweight shell script replacement for ddclient using RFC2136
# /etc/systemd/system/ddclient.service
[Unit]
Description=Dynamic DNS update wrapper for nsupdate
[Service]
Type=simple
Restart=no
ExecStart=/usr/local/sbin/my-ddclient
@AfroThundr3007730
AfroThundr3007730 / Hide-ConsoleWindow.ps1
Last active October 4, 2024 21:38
Hides a console window (even the new WindowsTerminal.exe)
# Adapted from https://stackoverflow.com/a/74976541/4087397
function Hide-ConsoleWindow() {
# Import 'ShowWindowAsync' method to properly hide windows
Add-Type -Name User32 -Namespace Win32 -MemberDefinition `
'[DllImport("user32.dll")] public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);'
# Mangle the window title to ensure it's unique and allow us to find it
$Host.UI.RawUI.WindowTitle = [Guid]::NewGuid()
# Find our process by the mangled window title and hide it
[Win32.User32]::ShowWindowAsync(
(Get-Process).where{ $_.MainWindowTitle -eq $Host.UI.RawUI.WindowTitle }.MainWindowHandle, 0)
@AfroThundr3007730
AfroThundr3007730 / Install-PythonRelease.ps1
Last active January 8, 2024 23:12
Install the Python language interpreter
Set-StrictMode -Version Latest
#Requires -Version 7
function Install-PythonRelease {
<# .SYNOPSIS
Install the Python language interpreter #>
param(
# Install for all users (requires admin)
[Switch]$AllUsers,
# Use beta build instead of latest stable
@AfroThundr3007730
AfroThundr3007730 / Update-LocalNugetRepository.ps1
Created June 27, 2023 20:23
Update a local Nuget repo from a remote repo
Set-StrictMode -Version Latest
# Inspired by: https://weblogs.asp.net/jongalloway/downloading-a-local-nuget-repository-with-powershell
function Update-LocalNugetRepository {
<# .SYNOPSIS
Update a local Nuget repo from a remote repo #>
Param(
# Remote repository feed URL
[Uri]$FeedURLBase = 'https://aka.ms/sme-extension-feed',
# Local repository directory
# .local/share/applications/com.chatterino.chatterino.desktop
[Desktop Entry]
Categories=Network;InstantMessaging;
Comment=Chat client for Twitch
Exec=systemd-run --user --scope --slice-inherit --slice chatterino -p MemoryMax=2G -u chatterino nice -n 19 ionice -c 3 chatterino
Icon=com.chatterino.chatterino
Name=Chatterino
NoDisplay=false
Path=
StartupNotify=true