Skip to content

Instantly share code, notes, and snippets.

View ngerakines's full-sized avatar
🏠
Working from home

Nick Gerakines ngerakines

🏠
Working from home
View GitHub Profile
@ngerakines
ngerakines / atproto-pds-design.md
Created May 7, 2026 17:23
atproto pds impl planning

atproto-pds: Foundational Design Document for a Rust ATProtocol Personal Data Server

Author of design brief: Nick Gerakines (CTO, Graze Social; founder, Smoke Signal & Lexicon Garden; author, AIP OAuth server; AT Protocol Community Fund member). Target home: tangled.org/ngerakines.me/atproto-crates, as a new crate atproto-pds. Date: May 1, 2026 (revision 2). Architectural North Star: A low-latency, highly-performant Rust PDS that is fully conformant to the existing reference implementations and is architected from day zero to support permissioned data spaces as a first-class concern, grounded in the concrete design laid out in bluesky-social/atproto/docs/superpowers/specs/2026-04-22-permissioned-data-pds-design.md (Daniel Holmgren's PDS implementation design, hereafter "the Spaces Design Spec"). The Spaces Design Spec supersedes the earlier Permissioned Data Diary blog posts as the authoritative source for protocol mechanics; the diary is retained only as conceptual backgr

{
"did": "did:plc:cbkjy5n7bk3ax2wplmtjofq2"
}
@ngerakines
ngerakines / main.go
Created September 22, 2025 19:05
linear aging (heap) priority queue
package main
import (
"fmt"
"time"
)
// Item represents an item in the priority queue with aging support
type Item struct {
Value string // The actual data/value
{
"dockerComposeFile": [
"docker-compose.yml"
],
"service": "devcontainer",
"workspaceFolder": "/workspace",
}
FROM golang:alpine3.21 AS build
ENV CGO_ENABLED=1
RUN apk add --no-cache gcc musl-dev
WORKDIR /workspace
COPY go.mod /workspace/
COPY go.sum /workspace/
RUN go mod download
COPY main.go /workspace/
ENV GOCACHE=/root/.cache/go-build
RUN --mount=type=cache,target="/root/.cache/go-build" go install -ldflags='-s -w -extldflags "-static"' ./main.go
PDS_SERVICE_HANDLE_DOMAINS=.pyroclastic.cloud
PDS_HOSTNAME=pds.your-ts-net-name.ts.net
PDS_JWT_SECRET=secret
PDS_ADMIN_PASSWORD=secret
PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX=secret
PDS_ADMIN_EMAIL=admin@pds.your-ts-net-name.ts.net
PDS_DATA_DIRECTORY=/pds
PDS_BLOBSTORE_DISK_LOCATION=/pds/blobs
LOG_ENABLED=true
PDS_DID_PLC_URL=https://plc.your-ts-net-name.ts.net
{
"$type": "app.bsky.feed.post",
"createdAt": "2024-12-20T17:10:58.154Z",
"embed": {
"$type": "app.bsky.embed.external",
"external": {
"description": "OpenAI’s o1 model is now available in GitHub Copilot and GitHub Models, bringing advanced coding capabilities to your workflows.",
"thumb": {
"$type": "blob",
"ref": {
import json
from multiformats import multibase, multicodec
from cryptography.hazmat.primitives.asymmetric import ec
from cryptography.hazmat.primitives.serialization import (
Encoding,
PublicFormat,
PrivateFormat,
NoEncryption,
)
{
"level": 30,
"time": 1732391431648,
"pid": 7,
"hostname": "heavenly-lance",
"req": {
"id": 12,
"method": "POST",
"url": "/did:plc:wbgfwsfq2vlmsutq77hbc5eq",
"query": {},