Skip to content

Instantly share code, notes, and snippets.

@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"

Streaming Whitelists and Blacklists for PiHole

Last Updated On: April 21, 2025 Last Updated Platform: Paramount+

Table of Contents

@c0m4r
c0m4r / _malicious_hide_youtube_short_extension_in_google_chrome_web_store.md
Last active February 21, 2025 21:49
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 April 25, 2025 03:25
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 April 25, 2025 10:45
Disable annoying Microsoft Edge first run experience, implicit sign-in, disable shopping, rewards, default browser campaign, auto import, forced sync, sidebar, restore browser reminder. Shows home button, enables SmartScreen.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Edge\Recommended]
"UserFeedbackAllowed"=dword:00000000
"AutoImportAtFirstRun"=dword:00000001
"SmartScreenEnabled"=dword:00000001
"PersonalizationReportingEnabled"=dword:00000000
"ShowRecommendationsEnabled"=dword:00000000
"ForceSync"=dword:00000000
"SyncDisabled"=dword:00000001
#!/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 July 15, 2024 08:23
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:

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.