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 / index.html
Created August 13, 2026 04:43 — forked from smontlouis/index.html
please don't sue me
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="color-scheme" content="light dark" />
<link
rel="icon"
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 64 64%22><circle cx=%2232%22 cy=%2232%22 r=%2230%22 fill=%22%235b7fe5%22/><circle cx=%2224%22 cy=%2228%22 r=%225%22/><circle cx=%2240%22 cy=%2228%22 r=%225%22/></svg>"
/>
@CypherpunkSamurai
CypherpunkSamurai / README.md
Created August 10, 2026 15:04
How to Fix "Can't Find the Specified File" Folder Rename Bug in Windows 11

Resolving the "Can't Find the Specified File" Folder Rename Bug in Windows 11

It is a notoriously frustrating system bug: you create a new folder in File Explorer, type out a new name, hit Enter, and immediately get slammed with a prompt stating, "Can't find the specified file. Make sure you specify the correct path and file name."

Ironically, executing the exact same rename operation via cmd or your terminal works flawlessly. The underlying file system is perfectly intact, but the graphical shell's directory rename handler is completely broken.

Here is a breakdown of exactly why this happens and the surgical PowerShell fix to resolve it.


#!/usr/bin/env python3
"""Source-based Unity NSISBI extractor for legacy and Unity 6000 installers.
Supported layouts discovered from Unity installers:
* Legacy 2020-2022: 4-byte flagged raw-LZMA1 chunks. The decoded NSIS
instruction table starts at 0x1b74, uses 36-byte records with opcode in
field 0, and field 3 is the compressed data-chunk offset. Each data chunk
expands directly to one file; there is no extra record-size word.
* Unity 6000: 3-byte raw-LZMA1 chunks, an eight-byte declared-size header
# =========================================================================
# Kimi K3 - minimal implementation
# =========================================================================
import torch
import torch.nn as nn
import torch.nn.functional as F
torch.manual_seed(0)
device = 'cuda' if torch.cuda.is_available() else 'cpu'
@CypherpunkSamurai
CypherpunkSamurai / README.md
Created August 7, 2026 08:11 — forked from Maciejdziuba/README.md
The Software Factory Playbook — Dex Horthy's 4-gate workflow (Product → Architecture → Program Design → Vertical Slices) as an installable Claude Code skill. From the Dex Horthy episode on David Ondrej's podcast.

The Software Factory Playbook — Dex Horthy's 4-gate workflow as a skill

A Claude Code Agent Skill built from Dex Horthy's (HumanLayer) playbook on David Ondrej's podcast.

"Once the model has written thousands of lines of code, it is harder to change. The sessions that generate design docs are context-light — you get the most model intelligence when you do the hard thinking early."

By default, agents build horizontally: all the backend, then all the frontend, then a 2,000-line diff lands in your lap and reviewing it is your problem. This skill flips that. Every decision that matters gets made before the code exists — where changing your mind costs a sentence, not a rewrite.

What it does

@CypherpunkSamurai
CypherpunkSamurai / gist:94a2cab8ae871d13e7be2b1f9ccdfdfc
Created August 4, 2026 18:35 — forked from diyan/gist:2850866
Python with PowerShell Remoting (Windows equivalent for Unix ssh sessions)
# Note that target_env.login and target_env.password is global variables
# Maybe I should add this into Fabric project (http://docs.fabfile.org/en/1.4.2/index.html).
# This is complicated task for sure but it would be nice if Fabric could use ssh under Linux and PowerShell Remoting under Windows.
def remote_sh(target_host, command_text, ignore_error=False):
print('run PowerShell script block at {0}: {1}'.format(target_host, command_text))
command_text = command_text.replace('"', '\'')
@CypherpunkSamurai
CypherpunkSamurai / fabric_monkey_patch.py
Created August 4, 2026 18:35 — forked from diyan/fabric_monkey_patch.py
Fabric monkey patch for replacing SSH transport with WinRM
import sys
import time
import subprocess
import types
from tempfile import TemporaryFile
def remote_sh(target_host, login, password, command_text, stdout=None, stderr=None):
winrs_text = 'winrs -remote:{0} -username:{1} -password:{2} -noprofile {3}'.format(
target_host, login, password, command_text)
#print('winrs text: {0}\n'.format(winrs_text))
@CypherpunkSamurai
CypherpunkSamurai / RUST_to_ODIN.md
Last active July 19, 2026 10:04
RUST to ODIN Porting

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 are porting a specific codebase, fill in the "Package map" table below with your crate→package layout before starting — everything else applies generally.

@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