Skip to content

Instantly share code, notes, and snippets.

View compuguy's full-sized avatar

Alex Hall compuguy

View GitHub Profile
@timvw
timvw / aws.tf
Created February 9, 2025 18:25
Terraform for Authentik as IdentityProvider in AWS Identity Center
# Authentik SAML Provider
resource "authentik_provider_saml" "aws" {
name = "AWS IAM Identity Center"
authorization_flow = data.authentik_flow.default_authorization_flow.id
invalidation_flow = data.authentik_flow.default_invalidation_flow.id
acs_url = "https://eu-central-1.signin.aws.amazon.com/platform/saml/acs/XXXX"
audience = "https://eu-central-1.signin.aws.amazon.com/platform/saml/d-YYYY"
issuer = "https://eu-central-1.signin.aws.amazon.com/platform/saml/d-YYYY"
signing_kp = data.authentik_certificate_key_pair.default.id
sp_binding = "post"

FYI (July 24, 2025): I've been away since July 11, dealing with an emergency move. I'll be back working on all the amazing comments y'all have been putting down, most possibly by the first weekend of August. I appreciate all the contributions everybody has been making and all the time everybody has put to make all of our lives better.

Streaming Whitelists and Blacklists for PiHole

Last Updated On:           July 10, 2025
Last Updated Platform:     Peacock

Table of Contents

@c0m4r
c0m4r / _malicious_hide_youtube_short_extension_in_google_chrome_web_store.md
Last active August 24, 2025 16:30
Malicious "Hide Youtube Shorts" extension in Google's Chrome Web Store

Malicious "Hide Youtube Shorts" extension in Google's Chrome Web Store

https://gist.githubusercontent.com/c0m4r/45e15fc1ec13c544393feafca30e74de/raw/6f5924b8e9c138cea35642b86c53b06011166ecc/hide_youtube_shorts_chrome_web_store.png

TL;DR: This extension for Chrome and Brave is malicious, do not use it.

(Update) A follow up story by Wladimir Palant: https://palant.info/2024/10/30/the-karma-connection-in-chrome-web-store/

(Update 2024-11-11) The extension has been removed from CWS and marked as violating Chrome Web Store policies (which is good, but odd, as it should be marked as malware)

@ThioJoe
ThioJoe / DisableUSBPowerManagement.ps1
Last active September 26, 2025 21:35
PowerShell script to disable Windows power management on all currently connected serial ports, including most (if not all) USB devices and adapters.
# PowerShell script to disable Windows power management on all currently connected serial ports, including USB adapters
# In simpler terms, it prevents Windows from turning off connected serial devices to save power.
# Equivalent to right-clicking on a serial port device in Device Manager > Properties > "Power Management" Tab > Unchecking "Allow the computer to turn off this device to save power."
$hubs = Get-CimInstance -ClassName Win32_SerialPort | Select-Object Name, DeviceID, Description
$powerMgmt = Get-CimInstance -ClassName MSPower_DeviceEnable -Namespace root\wmi
foreach ($p in $powerMgmt) {
$IN = $p.InstanceName.ToUpper()
foreach ($h in $hubs) {
@asheroto
asheroto / Disable-EdgeAnnoyances.reg
Last active December 4, 2025 10:33
Disables Edge’s first run, sign-in, Copilot, shopping, rewards, sync, sidebar, new tab clutter, and more; keeps SmartScreen, downloads, and home button enabled.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge]
"ShowDownloadsToolbarButton"=dword:00000001
"ShowRecommendationsEnabled"=dword:00000000
"CopilotPageContext"=dword:00000000
"ShowAcrobatSubscriptionButton"=dword:00000000
"PersonalizeTopSitesInCustomizeSidebarEnabled"=dword:00000000
"Microsoft365CopilotChatIconEnabled"=dword:00000000
"NewTabPageContentEnabled"=dword:00000000
#!/bin/bash
# DESCRIPTION
# This script migrates from "apt-key" managed keys to "[signed-by=/usr/share/keyrings/...]":
# - loop through all lists in /etc/apt/sources.list.d
# - read all lines with "deb..." that do not contain "[signed-by=]"
# - download the GPG signature from the URL
# - read the key ID from the signature
# - download and saves the key using gpg
# - add "[signed-by=/usr/share/keyrings/...]" to the "deb..." line
@luckman212
luckman212 / v6test.sh
Last active October 12, 2024 19:34
script for pfSense to detect IPv6 router advertisements coming from a WAN interface
#!/bin/sh
# set the variable below to your FIOS interface
IF=igb0
/usr/bin/timeout 5m /usr/sbin/tcpdump -ni ${IF} 'icmp6 && ip6[40] == 134' >/tmp/${IF}_RAs.out
FSIZE=$(/usr/bin/stat -f '%z' /tmp/${IF}_RAs.out)
if [ "$FSIZE" -gt 1 ]; then
echo '<?php include("notices.inc"); $msg = "IPv6 RAs detected on interface '$IF'"; notify_via_smtp($msg);?>' | /usr/local/bin/php -q
fi
@jovimon
jovimon / gist:524e116471f249626fd2ccd141f3fe05
Last active November 24, 2025 18:46
compile realtek network driver for pfsense 2.4.x

How to compile and install latest realtek network driver in pfSense 2.4.x (FreeBSD 11.1)

  1. Download FreeBSD 11.1 VMDK and create a VM with it as HDD.

  2. Get FreeBSD source tree for your exact FreeBSD version and uncompress it to /usr/src:

    fetch -o /tmp ftp://ftp.freebsd.org/pub/`uname -s`/releases/`uname -m`/`uname -r | cut -d'-' -f1,2`/src.txz
    tar -C / -xvf /tmp/src.txz
    
  3. Download latest Realtek network driver (you need to input an email address).

@YoRyan
YoRyan / excavator-driver.py
Last active April 2, 2022 20:36
Cross-platform controller for NiceHash Excavator for Nvidia (aka, NiceHash 2 for Linux). This is no longer maintained, please see https://github.com/YoRyan/nuxhash
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Cross-platform controller for NiceHash Excavator for Nvidia."""
# Example usage:
# $ excavator -p 3456 &
# $ python3 excavator-driver.py
# History:
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active December 8, 2025 04:45 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.