Skip to content

Instantly share code, notes, and snippets.

View steinerkelvin's full-sized avatar

Kelvin Steiner steinerkelvin

View GitHub Profile
@steinerkelvin
steinerkelvin / email-setup-gist.md
Last active April 27, 2026 18:39
My email setup: filters as code + local Gmail mirror + indexed search

My email setup: filters as code + local mirror + indexed search + TUI

Gmail with my data on disk and my filter rules in git. No vendor lock on the routing logic, full-text search that doesn't depend on an internet round-trip, and a TUI for triage. Built as five small CLI tools wired together with a justfile.

This is the shape of the system, not the secrets. The Nix module that installs it is reproduced inline below; my account configs and OAuth credentials live in private stores. Friends can lift the structure into their own dotfiles in an afternoon.

The stack

Five tools, each doing one thing:

@steinerkelvin
steinerkelvin / ideas.md
Last active April 11, 2026 03:17
Kaether: local-first agent coordination -- OS layers, shared skills, CRDT state, ocap
description Kaether direction brainstorm -- layered agent OS with ocap, shared skills, CRDT state, Agentica runtime, and the path from local coordination to Torus-scale swarms
project kaether
type brainstorm
created 2026-04-10
share close

Kaether Ideas

@steinerkelvin
steinerkelvin / chat.md
Created April 16, 2024 22:33
The Interplay of Conformity: Abilene Paradox, Pluralistic Ignorance, and Spiral of Silence — a Claude 3 Opus chat

User: Explain the relations between the Abilene Paradox, pluralistc ignorance and the spiral of silence.

Assistant: The Abilene Paradox, pluralistic ignorance, and the spiral of silence are related concepts in social psychology that deal with group dynamics, conformity, and decision-making processes. Here's how they are connected:

  1. Abilene Paradox:
  • Occurs when a group collectively decides on a course of action that is contrary to the preferences of most of the individuals in the group.
  • People go along with the decision to avoid conflict or to not "rock the boat," even though it's not what they want.
  • Results in a decision that no one really wants, but everyone feels pressured to agree to.
  1. Pluralistic Ignorance:
@steinerkelvin
steinerkelvin / result_adt_wip_madness.ts
Last active April 10, 2024 19:28
mad scientist TypeScript Result ADT
import { Enum, MatchDictFor, match } from "."
export type Option<T> = T | null
export type Result<T, E> = Enum<{
Ok: T,
Err: E,
}>
interface ResultI<T, E> {
@steinerkelvin
steinerkelvin / typed_getter_setter_closure.py
Created April 9, 2024 16:11
Typed Python getter-setter hook closure function
from typing import Callable, TypeVar, Generic, Protocol
T = TypeVar("T")
class SetterGetterFn(Generic[T], Protocol):
def __call__(self, x: T = ..., /) -> T:
...
def create_state_fn(default: Callable[..., T]) -> SetterGetterFn[T]:
"""
@steinerkelvin
steinerkelvin / README.md
Last active November 24, 2022 16:41
simple TLS/SSL termination with Traefik

simple TLS/SSL termination with Traefik

This is a simple Docker setup of a Traefik container to do SSL/TSL terminantion (you delegate SSL/TLS to another service instead of doing it in the application itself).

It works with applications running on the host (instead of another container) if using the following on Docker Compose:

 extra_hosts:
@steinerkelvin
steinerkelvin / keybase.md
Created June 28, 2022 16:04
Keybase verification for `steinerkelvin`

Keybase proof

I hereby claim:

  • I am steinerkelvin on github.
  • I am kelvinsantos (https://keybase.io/kelvinsantos) on keybase.
  • I have a public key ASB-bPsqg4-5Ptnh7nKuug7MReFWk--Td-CyZ6DRttsEAAo

To claim this, I am signing this object:

@steinerkelvin
steinerkelvin / rust_serde_json_enum_on_typescript.ts
Created June 17, 2022 14:12
Typescript typings and utility functions for Rust's serde / serde_json serialized enums (tagged unions)
// Some magic from
// https://stackoverflow.com/questions/65750673/collapsing-a-discriminated-union-derive-an-umbrella-type-with-all-possible-key
// I replaced `undefined` usages with the placeholder below so we can exclude
// it properly on the last definition.
declare const PLACEHOLDER: unique symbol
type Placeholder = typeof PLACEHOLDER
// Magic as far as I'm concerned.
@steinerkelvin
steinerkelvin / default.conf
Last active March 24, 2022 20:31
keyd v2 config
[ids]
04d9:a096
[main]
capslock = layer(custom_caps)
[custom_caps:M]
@steinerkelvin
steinerkelvin / auto_sprintf.c
Created February 21, 2022 21:02
auto_sprintf
#define ASPTF_ARGS _BUFFER, _TAM
/**
* Aloca automaticamente o espaço necessário para uma string formatada
* resultante de um "sprintf".
*
* @param dest Variável onde armazenar a string formatada resultante
* @param sptf Expressão de snprintf que deve ser do formato:
* `snprintf(ASPTF_ARGS, <formato>, ... )`, que é equivalente a:
* `snprintf(_BUFFER, _TAM, <formato>, ... )`