Skip to content

Instantly share code, notes, and snippets.

@progrium
progrium / spec.md
Last active October 1, 2025 16:45
Filesystem over HTTP spec. Looking for review / comments

HTTP Filesystem Protocol Specification

Overview

The HTTP Filesystem Protocol provides a RESTful interface for performing POSIX-like filesystem operations over HTTP. It enables hierarchical file and directory manipulation using standard HTTP methods with filesystem-specific metadata encoded in HTTP headers.

Protocol Design

Core Principles

@progrium
progrium / Dockerfile
Last active September 25, 2025 10:23
Minimal VSCode for Web deployment. This includes a minimal Dockerfile to build VSCode and then an HTML file to run it.
FROM node:22-alpine
ARG VSCODE_VERSION=1.103.2
RUN apk add -u krb5-dev libx11-dev libxkbfile-dev libsecret-dev git build-base python3
RUN git clone --depth 1 https://github.com/microsoft/vscode.git -b $VSCODE_VERSION
WORKDIR /vscode
RUN npm i
RUN npm run gulp vscode-web-min
@progrium
progrium / script.js
Last active April 27, 2025 00:44
original "paper prototype" demo script / spec for wanix 0.3 imagining how basic primitives would be used to bootstrap a terminal+vm using only filesystem operations
const w = new Wanix()
Object.getPrototypeOf(w)
// {readFile: ƒ, writeFile: ƒ, readDir: ƒ, exists: ƒ}
await w.readDir(".")
// ['dom/', 'fsys/', 'proc/', 'term/', 'vm/']
await w.readDir("fsys")
// ['ctl', 'new/']
await w.readDir("fsys/new")
@progrium
progrium / fsys.md
Last active January 6, 2025 00:20
go filesystem api design walkthrough

io package

Core interfaces

type Reader interface {
	Read(p []byte) (n int, err error)
}

type Writer interface {
	Write(p []byte) (n int, err error)
@progrium
progrium / vscode86.md
Created June 24, 2024 19:44
vscode integrated with v86, a dev environment entirely in the browser
#!/bin/sh
apptron app indicator - ./icon.png <<MENU |
Timers
5 seconds
10 seconds
30 seconds
Say Hello
---
Quit
MENU
@progrium
progrium / datetimeformat.js
Last active December 29, 2024 18:02
Intl.DateTimeFormat is kinda nutty with custom format strings, this makes it sane
function dateTimeFormat(timestamp, locale, str, ...opts) {
const d = new Date(timestamp);
return str.replace(/{(\d+)}/g, function(match, number) {
return typeof opts[number] != 'undefined'
? new Intl.DateTimeFormat(locale, opts[number]).format(d)
: match;
});
}
console.log(dateTimeFormat("2021-11-19T19:19:36.598071-06:00", "en", "{0} at {1}!", {dateStyle:"short"}, {timeStyle:"long"}))
// styling module provides a helper for building style
// and class attributes for elements.
type Styling = string | Object | Style | (() => boolean);
type ConditionedStyle = [string, () => boolean];
export function from(...styling: Styling[]): Style {
return Style.from(...styling);
}
@progrium
progrium / cli.go
Created September 2, 2021 01:13
350 line reimplementation of cobra, simplified and with no dependencies
package cli
import (
"bytes"
"context"
"flag"
"fmt"
"os"
"reflect"
"strings"
@progrium
progrium / server.go
Created August 25, 2021 15:59
simple qtalk rpc server example
// server.go
package main
import (
"fmt"
"log"
"net"
"strings"
"github.com/progrium/qtalk-go/codec"