Skip to content

Instantly share code, notes, and snippets.

View gary23w's full-sized avatar

Garrett Stimpson gary23w

View GitHub Profile
@gary23w
gary23w / google.ps1
Created July 7, 2026 18:18
simplegoogleshield
$Aggressive = [bool]($args -contains '-Aggressive')
$Remove = [bool]($args -contains '-Remove')
$Status = [bool]($args -contains '-Status')
$ErrorActionPreference = 'Stop'
$hosts = "$env:windir\System32\drivers\etc\hosts"
$begin = '# >>> google-shield BEGIN (managed) >>>'
$end = '# <<< google-shield END <<<'
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()
@gary23w
gary23w / privacy.ps1
Created July 7, 2026 18:06
simplewindowsprivacy
[CmdletBinding()]
param([switch]$WhatIfOnly)
$ErrorActionPreference = 'Stop'
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()
).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
Write-Warning "Not elevated. HKLM changes will fail. Re-run from an elevated PowerShell."
}
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$stamp = Get-Date -Format 'yyyyMMdd-HHmmss'
$backupDir = Join-Path $here "backup-$stamp"
@gary23w
gary23w / simplepacketsniffer.py
Last active June 16, 2026 21:59
simple-packet-sniffer.py
"""
simplepacketsniffer.py 0.5 -- single-file edition
Packet sniffer / lightweight IDS with deep protocol decoding (HTTP/DNS/TLS+JA3/
SMTP/SMB), TCP reassembly, file carving, YARA, heuristics, an ML fast-path, and
an on-device LLM analyst. The paid OpenAI dependency is replaced by a local
Qwen2.5 GGUF model (via llama-cpp-python) that auto-downloads and caches on first
run -- no API key, no network after caching.
Hybrid detection layer (see AI/ML section below):
@gary23w
gary23w / simplephpserver.py
Created November 22, 2024 15:52
python simple webserver with php and hot reload
# installs php-cgi . arch linux goes oom . spends 1702 hours fixing arch linux
# I like working in php sometimes too
import socket
import threading
import logging
import os
import subprocess
import re
import time
import select
@gary23w
gary23w / simpleclickermacro.py
Last active February 5, 2025 17:19
Couldn't find a good clicker macro app, so I decided to create one myself.
# Couldn't find a good clicker macro app. so I decided to create one myself.
import tkinter as tk
from tkinter import Toplevel, Label, Button, Checkbutton, IntVar
import pyautogui
import time
import threading
import logging
from pynput import keyboard, mouse
import signal
import sys
@gary23w
gary23w / simplebayestheoremguidestatistics.md
Last active February 5, 2025 17:19
Shaping and Illustrating after my morning coffee...
@gary23w
gary23w / simpleimagetostring.sh
Last active February 5, 2025 17:19
image-to-string
#!/bin/bash
mkdir -p trocr_app
cd trocr_app
cat << 'EOF' > ocr.py
import sys
from PIL import Image
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
@gary23w
gary23w / gary.bf
Created October 7, 2024 17:35
gary was here
++++++++++[>++++++++++<-]>+++.------.+++++++++++++++++.+++++++.[-]++++++++++++++++++++++++++++++++.<+++++++[>+++++++++++++++++<-]>.----------------------.++++++++++++++++++.[-]++++++++++++++++++++++++++++++++.<++++++++[>+++++++++++++<-]>..---.+++++++++++++.-------------.
@gary23w
gary23w / simplepolicyservice.ps1
Last active February 5, 2025 17:20
policy-and-service-config
# services and policies :\
# New names for the accounts
$NewAdminName = "GaryAdmin"
$NewGuestName = "GaryGuest"
# Define the services to be disabled
$servicesToDisable = @(
"MapsBroker", # Downloaded Maps Manager
"lfsvc", # Geolocation Service
@gary23w
gary23w / simplematrixscreensaver.sh
Last active February 5, 2025 17:20
matrix-style-cascading-screensaver-in-bash
#!/bin/bash
# free time plus a need to build a screensaver in bash, enjoy the cascade.
# ps. the key to this is the "eval" function.
# - gary
# clear the screen and hide the cursor
echo -e "\033[2J\033[?25l"
# get the number of lines and columns of the terminal
R=$(tput lines)