Skip to content

Instantly share code, notes, and snippets.

@mikefener
mikefener / tiny_cpu.py
Created September 21, 2026 15:38
Logic Sketchbook, episode 3: a tiny computer with 16 memory boxes; counts the steps to add and multiply (python3, no libraries)
"""Episode 3: a tiny computer we built ourselves, so every step in the video is a REAL run, not an animation guess.
16 boxes (memory), each holds 8 switches (a number 0-255). An instruction is one number: the first half (4 switches) says WHAT to do,
the second half (4 switches) says WHICH box. Python 3, no libraries. Run it: python3 tiny_cpu.py"""
import json, dis, io, sys, contextlib
HALT, LOAD, ADD, STORE, SUB, JNZ = 0, 1, 2, 3, 4, 5
NAME = {HALT: "halt", LOAD: "load", ADD: "add", STORE: "store", SUB: "subtract", JNZ: "jump if not zero"}
def enc(op, box=0): return op * 16 + box # first half = what, second half = which box
def run(mem, trace=None, limit=100000):
mem = mem[:] + [0] * (16 - len(mem)); acc = 0; pc = 0; steps = 0 # acc = the notepad, pc = the bookmark
while steps < limit:
@dxenes1
dxenes1 / download_skeleton.py
Created September 21, 2026 15:38
download_skeleton.py
#!/usr/bin/env python3
"""Download an H01 skeleton and save it as a MeshParty HDF5 file.
Requires caveclient, cloud-volume, meshparty, numpy, and requests.
"""
import os
from pathlib import Path
import numpy as np
@cuilinhao
cuilinhao / youtube-outlier-csv-ranking.md
Created September 21, 2026 15:38
YouTube outlier CSV ranking: offline Python script, example data and interpretation notes

Rank YouTube research candidates from a local CSV

A small offline Python utility for an initial pass through video research data. It ranks videos by views divided by channel subscribers, then breaks ties by views. It uses only the Python standard library and makes no network requests.

Input and example

Save a UTF-8 file named videos.csv with these exact column names. The IDs and numbers below are illustrative, not measurements of real videos.

video_id,views,subscribers
@choco-bot
choco-bot / 1.RegistrySnapshot.xml
Created September 21, 2026 15:37
Spark v3.0.2 - Passed - Package Tests Results
<?xml version="1.0" encoding="utf-8"?>
<registrySnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<user>S-1-5-21-2791855482-793256338-1659849073-1000</user>
<keys>
<key installerType="Unknown" displayName="Spark 3.0.2" displayVersion="3.0.2">
<RegistryView>Registry32</RegistryView>
<KeyPath>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\3057-7228-2063-7466</KeyPath>
<DefaultValue />
<InstallLocation><![CDATA[C:\Program Files (x86)\Spark]]></InstallLocation>
<UninstallString><![CDATA["C:\Program Files (x86)\Spark\uninstall.exe"]]></UninstallString>
@keinsell
keinsell / gist:8ab87457429565eee8f4a0918570d90a
Created September 21, 2026 15:37
How do you find a job?
Search twitter and linkedin for "hiring" check down if they use what you use and simply message, no reason to be jobless.
@info-mnml
info-mnml / widget-mockup.html
Created September 21, 2026 15:37
MNML Roadmap Widget mockup
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>MNML Roadmap Widget モックアップ</title>
<style>
body {
background: #1c1c1e;
color: #fff;
font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans", sans-serif;
@wpank
wpank / roko-run-abc12345.md
Created September 21, 2026 15:37
roko run transcript abc12345

◆ roko run · abc12345

agent researcher · role analyst · 2026-09-21T15:37:09Z

Prompt

Use [REDACTED] for this
@wpank
wpank / roko-run-abc12345.md
Created September 21, 2026 15:37
roko run transcript abc12345

◆ roko run · abc12345

agent researcher · role analyst · 2026-09-21T15:37:09Z

Prompt

Use [REDACTED] for this
@zhih0716
zhih0716 / Record.md
Last active September 21, 2026 15:37
[581] KKB-1665 行車紀錄

KKB-1665 行車紀錄

  • 駕駛:83489 拿森
序號 站名 到站時間
54 成泰路三段 23:37:33
@jacking75
jacking75 / tailscale.md
Created September 21, 2026 15:37
TailScale 사용하기

Tailscale을 이용한 로컬PC의 게임 서버 외부 공개

Tailscale을 이용하여 개발 환경 준비하기

개요

Tailscale은 WireGuard 기반의 VPN Overlay Network를 구성해 주는 서비스로, 로컬 PC가 NAT 뒤에 있거나 공개 IP가 없어도 외부에서 안전하게 접속할 수 있도록 할 수 있다.

즉, 로컬 PC가 사설망(예: 192.168.x.x, 10.x.x.x)에 있어도 Tailscale이 부여하는 100.x.x.x (CGNAT range) 또는 fd7:…(IPv6) 주소로 외부 장치가 접속할 수 있다.