Skip to content

Instantly share code, notes, and snippets.

View CypherpunkSamurai's full-sized avatar
😶
Currently Busy 🌻🐢

Cypherpunk Samurai CypherpunkSamurai

😶
Currently Busy 🌻🐢
View GitHub Profile
@CypherpunkSamurai
CypherpunkSamurai / deduppath.extend.once.ps1
Last active July 15, 2026 02:31
Remove Path Limit Cause Retarded Microsoft Employees Know More Than You About Your Computer
# DEDUP + LONG PATHS — run in elevated PowerShell
$path = [Environment]::GetEnvironmentVariable('Path', 'Machine'); $seen = @{}; $deduped = ($path -split ';' | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne '' -and -not $seen.ContainsKey($_.ToLower()) } | ForEach-Object { $seen[$_.ToLower()] = $true; $_ }) -join ';'; [Environment]::SetEnvironmentVariable('Path', $deduped, 'Machine'); $reg = 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem'; Set-ItemProperty -Path $reg -Name 'LongPathsEnabled' -Value 1 -Type DWord; $gpo = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\FileSystem'; if (-not (Test-Path $gpo)) { New-Item -Path $gpo -Force | Out-Null }; Set-ItemProperty -Path $gpo -Name 'LongPathsEnabled' -Value 1 -Type DWord; Write-Host "PATH deduped ($($path.Split(';').Count - $seen.Count) removed). Long paths enabled. REBOOT." -ForegroundColor Green
@CypherpunkSamurai
CypherpunkSamurai / RL_Env_Game_Gamified.md
Created July 2, 2026 06:26
RL (Reinforcement Learning) Environment Game (Gamified)
@CypherpunkSamurai
CypherpunkSamurai / HOW_IT_WORKS.md
Created July 1, 2026 20:00
ASUS ROG keyboard backlight control

How It Works

The ASUS keyboard backlight is controlled via a HID Feature Report sent over USB. This document breaks down every byte.

USB Capture (Wireshark)

Frame from ledbacklight.pcapng:

0000   1c 00 50 e0 78 25 88 97 ff ff 00 00 00 00 1b 00   ..P.x%..........

Rust → Odin porting guide

You are translating one Rust file to Odin. Read this whole document before writing any code. The goal of Phase A is a draft .odin next to the .rs that captures the logic faithfully — it does not need to compile. Phase B makes it compile package-by-package.

This guide is project-agnostic. If you're porting a specific codebase, fill in the "Package map" table below with your crate→package layout before starting — everything else applies generally.

// ==UserScript==
// @name Auto-Resize Chat Input Fix
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Fixes laggy auto-resize and pasting issues for the chat textarea
// @author DevTools Assistant
// @match *://*/*
// @grant none
// ==/UserScript==
@CypherpunkSamurai
CypherpunkSamurai / ytdlp.py
Created June 7, 2026 18:43
YTDLP with DOH
#!/usr/bin/env python3
"""
yt-dlp-doh: DNS over HTTPS (DoH) Wrapper for yt-dlp with Logging
This script enables DNS over HTTPS for yt-dlp by monkey-patching Python's
socket.getaddrinfo() function to resolve hostnames via encrypted DoH queries
instead of the system's default DNS resolver.
Features:
✓ Encrypted DNS resolution via RFC 8484 DoH endpoints
@CypherpunkSamurai
CypherpunkSamurai / README.md
Created June 3, 2026 15:12 — forked from Artefact2/README.md
GGUF quantizations overview

Which GGUF is right for me? (Opinionated)

Good question! I am collecting human data on how quantization affects outputs. See here for more information: ggml-org/llama.cpp#5962

In the meantime, use the largest that fully fits in your GPU. If you can comfortably fit Q4_K_S, try using a model with more parameters.

llama.cpp feature matrix

See the wiki upstream: https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix

package d3d11_main
import D3D11 "vendor:directx/d3d11"
import DXGI "vendor:directx/dxgi"
import D3D "vendor:directx/d3d_compiler"
import SDL "vendor:sdl2"
import glm "core:math/linalg/glsl"
// Based off https://gist.github.com/d7samurai/261c69490cce0620d0bfc93003cd1052
@CypherpunkSamurai
CypherpunkSamurai / OPENSANDBOX.md
Last active May 31, 2026 05:06
OpenSandBox QuickStart

pip install opensandbox-code-interpreter opensandbox-server

$env:OPENSANDBOX_URL="http://localhost:8081"

Step 1: Initialize the Configuration Correctly

Specify the target config file path (~/.sandbox.toml) and replace -f with --force: [1, 2]

opensandbox-server.exe init-config ~/.sandbox.toml --example docker --force

@CypherpunkSamurai
CypherpunkSamurai / README.md
Created May 26, 2026 18:33
Python3 Portable

Here is the complete, definitive guide to the Python and Conda packaging ecosystems. This integrates every component from the original list, alongside native Python tooling, modern Rust-based alternatives, embedded environments, and direct URLs for every tool.

1. Full Installer Distributions (Heavyweight)

These installers package the environment tool along with massive pre-compiled software bundles.

  • Anaconda Distribution: The flagship 5GB+ bundle. It includes a Graphical User Interface (Anaconda Navigator) and hundreds of pre-installed data science packages. Subject to Anaconda's commercial license fees.
  • URL: anaconda.com/download