Skip to content

Instantly share code, notes, and snippets.

View kylemanna's full-sized avatar

Kyle Manna kylemanna

View GitHub Profile
@kylemanna
kylemanna / thinking.md
Created January 25, 2025 22:04
deepseek-r1:8b question: "How many Rs in strawberry"
Thought for 328 seconds

Okay, so the question is asking how many Rs are in "strawberry." Alright, let's break this down. First, I'll write out the word: S-T-R-A-W-B-E-R-R-Y. Hmm, that seems a bit tricky because sometimes letters can be tricky when they're close together or look similar.

Let me go through each letter one by one to make sure I don't miss any R's. Starting from the beginning:

  1. S – that's not an R.
  2. T – nope.
  3. R – okay, that's the first R.
@kylemanna
kylemanna / set_pwm.py
Created December 16, 2024 05:17
Shelly Plus RGBW Arduino BLE Server
import asyncio
import argparse
import sys
from bleak import BleakClient
# Updated characteristic UUID
characteristic_uuid = "1ED5100D-F00D-FA11-0F1C-1ED5100D1F10"
def parse_args():
parser = argparse.ArgumentParser(description="Read and optionally write PWM values to an ESP32 BLE device.")
@kylemanna
kylemanna / podman-compose.yaml
Last active March 17, 2024 22:02
Podman Compose File that runs Windows in KVM + QEMU
# Podman Compose File that runs Windows in KVM + QEMU
#
# Upstream: https://github.com/dockur/windows
#
# Note: Can't run this rootless as the netardvark proxy doesn't create a host
# network interface for communication with the container which is what's
# expected for the iptables NAT port forwarding rule to work for port 3389.
# Instead it arrives appearing to be from the same interface and skips the nat
# redirect and fails.
#
#!/usr/bin/env python
"""Prefix wrapper for wireguard-vanity-address
* Improve performance for generating keys with common prefixes.
* Extract prefixes delimited by a '+' or '/'.
* Exit at least on match for each prefix.
Usage:
$ wg-vanity.py ex{1,2,3}
Searching for ['ex1/', 'ex1+', 'ex2/', 'ex2+', 'ex3/', 'ex3+'] with ['wireguard-vanity-address', '--in', '2', 'ex']
@kylemanna
kylemanna / README.md
Created November 1, 2023 23:28
Simple network speedtest in Docker container

README

Run a quick network test.

docker run --rm -it --workdir=/tmp alpine sh -c 'apk add -u bash grep; wget -qO- network-speed.xyz | su -s /bin/bash nobody'

@kylemanna
kylemanna / 0001-release-linuxptp-4.1.patch
Created October 1, 2023 06:56
Arch Linux AUR linuxptp v4.1
From 27869268409c6bb7247d5fff51f80b31792825c0 Mon Sep 17 00:00:00 2001
From: Kyle Manna <[email protected]>
Date: Sun, 1 Oct 2023 01:56:26 -0500
Subject: [PATCH] release: linuxptp 4.1
* Many changes!
---
.SRCINFO | 6 +++---
PKGBUILD | 7 +++----
2 files changed, 6 insertions(+), 7 deletions(-)
@kylemanna
kylemanna / tailscale-default-unroute.py
Last active May 8, 2023 05:37
Tailscale Per Host Default Router Disabler
#!/usr/bin/env python3
""" Tailscale Per Host Default Router Disabler
Tailscale allows a single tailnet wide "Override local DNS" setting that works
great for mobile and random cloud machines I have. However, my more elaborate
setups require the ability to turn this off and use local DNS as the default
route.
Unfortuantely with Tailscale as of v1.40.0 there's only two options:
1. Tailnet wide "local DNS override" (Turns out tailscale's internal resolver
@kylemanna
kylemanna / 0_gluetun_network_bug.md
Last active March 29, 2023 01:43
Bug notes for gluetun multiple networks issue.

README

Issue

The gluetun container doesn't work correctly with multiple networks attached.

This is an example of a working and broken config with only minor differences.

Expected Output

@kylemanna
kylemanna / ingress.nft
Last active February 4, 2023 09:21
ATT UVerse Disable Drop DHCP for temproary 192.168.1.64 address on BGW320 and block Bogons/DDoS packets using nftables
#!/usr/sbin/nft -f
#
# Can't block DHCP like a normal service beacuse it use raw sockets and bypasses nftables filter chains. Instead use and ingress chain.
#
flush table netdev filter
table netdev filter {
# Earliest filtering chain
chain ingress {
type filter hook ingress device wan0 priority -500;