Skip to content

Instantly share code, notes, and snippets.

View mitsuhiko's full-sized avatar
🖥️
What's happening

Armin Ronacher mitsuhiko

🖥️
What's happening
View GitHub Profile
@mitsuhiko
mitsuhiko / enable-vt-input-node-package-plan.md
Last active May 19, 2026 23:12
Plan for a tiny Node package that enables Windows ENABLE_VIRTUAL_TERMINAL_INPUT

Plan: tiny Node package for enabling Windows VT input

Goal

Publish one npm package that exposes a single function:

import { enableVirtualTerminalInput } from "enable-vt-input";

const ok = enableVirtualTerminalInput();
@mitsuhiko
mitsuhiko / README.md
Created May 16, 2025 08:23
This is a vibecoded automator thing that talks a basic JSON protocol to query windows with the accessibility api

Example query:

{
  "cmd": "query",
  "multi": true,
  "locator": {
    "app": "Safari",
    "role": "AXStaticText",
    "match": {},
function crc32(value: string): number {
return 0xd0d0deadbeef;
}
type SerializedMetric = Array<number> | number;
interface Metric<T> {
add(value: T): void;
flush(): SerializedMetric;
}
import time
import zlib
from threading import Lock, Thread
class Metric(object):
def add(self, value):
raise NotImplementedError()
def flush(self):

These become tabbed automatically

Foo.bar()
[Foo bar]
Some stuff here
```yaml,alert
title: Foo
body: Bar
```
Bla bla
[package]
name = "debscraper"
version = "0.1.0"
authors = ["Armin Ronacher <armin.ronacher@active-4.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
url = "2.1.0"
diff --git a/src/service/objects/mod.rs b/src/service/objects/mod.rs
index d6dcdd6..1c79c67 100644
--- a/src/service/objects/mod.rs
+++ b/src/service/objects/mod.rs
@@ -313,6 +313,7 @@ pub struct ObjectsActor {
meta_cache: Arc<Cacher<FetchFileMetaRequest>>,
data_cache: Arc<Cacher<FetchFileDataRequest>>,
download_thread: RemoteThread,
+ cache_pool: ThreadPool,
}
import re
import os
import io
import json
import lzma
import email
import pickle
import hashlib
import tarfile
import binascii