Skip to content

Instantly share code, notes, and snippets.

@twobob
twobob / TryFoxy.html
Created October 30, 2025 22:45
Tunnel Vision Dissolve Shader
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tunnel Vision Dissolve Shader</title>
<style>
body { margin: 0; overflow: hidden; background-color: #add8e6; }
canvas { display: block; }
.info {
# Made by @xdavidhu (github.com/xdavidhu, https://xdavidhu.me/)
# Merge with https://github.com/Pinoccio/tool-serial-pcap/blob/master/serial-pcap
# And https://wiki.wireshark.org/CaptureSetup/Pipes
import serial
import io
import os
import subprocess
import signal
import time
@twobob
twobob / normaliseVideo.ps1
Created October 22, 2025 17:04
two pass audio normalise ffmpeg powershell
# --- Configuration ---
$inputFile = "C:\Users\new\Videos\someVideo.mp4"
$outputFile = "C:\Users\new\Videos\someVideoNormalised.mp4"
# --- Target Loudness ---
$target_I = "-14"
$target_LRA = "7"
$target_TP = "-1.5"
Write-Host "Running Pass 1 (analysis)..." -ForegroundColor Yellow
@twobob
twobob / chromakey.ts
Last active October 18, 2025 00:13
do chroma for cheapa
export interface ChromaKeyOptions {
keyColor?: [number, number, number] // RGB color to key out (default: magenta)
tolerance?: number // Tolerance range for color matching (0-100)
softness?: number // Edge softness (0-100)
spill?: number // Spill suppression strength (0-100)
preserveEdges?: boolean // Preserve edge detail
}
export interface ImageData {
data: Uint8ClampedArray
export interface DeSepAIOptions {
strength?: number
notchWhiten?: boolean
shiftBase?: [number, number, number]
preserveDark?: boolean
}
export interface ImageData {
data: Uint8ClampedArray
width: number
@twobob
twobob / make_vid_from_wav.py
Created October 2, 2025 22:35
reads a WAV audio file, generates a radial polar visualization where concentric rings pulse and modulate based on the audio waveform amplitude, renders each frame as an image, and combines them into an MP4 video with the original audio synced.
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import wave
import contextlib
import cv2
import os
import shutil
from moviepy.editor import AudioFileClip, VideoFileClip
@twobob
twobob / RebuildModelFromBlobs.py
Created October 2, 2025 20:12
Follows all symbolic links in a given source directory, copies the target files (blobs) to a new 'MODEL' directory, and names the copies after the original symlinks. So rebuild a gguf from a huggingface blob dir
import os
import shutil
from pathlib import Path
def follow_and_copy_symlinks(source_directory: str, model_directory_name: str = "MODEL"):
"""
Follows all symbolic links in a given source directory, copies the target
files (blobs) to a new 'MODEL' directory, and names the copies after
the original symlinks.
@twobob
twobob / iris.data
Created September 24, 2025 01:10
show 2d linear separation with first priciples. no libs (except for rendering the gif)
5.1,3.5,1.4,0.2,Iris-setosa
4.9,3.0,1.4,0.2,Iris-setosa
4.7,3.2,1.3,0.2,Iris-setosa
4.6,3.1,1.5,0.2,Iris-setosa
5.0,3.6,1.4,0.2,Iris-setosa
5.4,3.9,1.7,0.4,Iris-setosa
4.6,3.4,1.4,0.3,Iris-setosa
5.0,3.4,1.5,0.2,Iris-setosa
4.4,2.9,1.4,0.2,Iris-setosa
4.9,3.1,1.5,0.1,Iris-setosa
@twobob
twobob / RebuildModelFromBlobs.py
Created September 4, 2025 17:37
Follows all symbolic links in a given source directory, copies the target files (blobs) to a new 'MODEL' directory, and names the copies after the original symlinks.
import os
import shutil
from pathlib import Path
def follow_and_copy_symlinks(source_directory: str, model_directory_name: str = "MODEL"):
"""
Follows all symbolic links in a given source directory, copies the target
files (blobs) to a new 'MODEL' directory, and names the copies after
the original symlinks.
@twobob
twobob / blocsky.bsky.social‬
Created August 27, 2025 03:31
blocked Bluesky accounts
Humanity and Kindness
‪@humanityposts.bsky.social‬
Adam A. Marshall
‪@a-marshall-plan.bsky.social‬
Windows Central
‪@windowscentral.com‬
Gracie12 📎
‪@gracienlucy.bsky.social‬
julia
‪@naomishambles.bsky.social‬