Skip to content

Instantly share code, notes, and snippets.

View capitalist's full-sized avatar
🎯
Focusing

Joe Martinez capitalist

🎯
Focusing
View GitHub Profile
@pmarreck
pmarreck / jj_cheatsheet.md
Last active June 3, 2026 22:37
Jujutsu "Cheatsheet" for LLM's and Git users

Jujutsu (jj) Quick Reference (For Users and Agents)

For Git Users: The Mental-Model Shifts

The command-translation table below is necessary but not sufficient. A few git assumptions don't carry over — internalize these and the rest of jj stops looking weird.

1. No staging area. Your working copy IS a commit (the @ commit). Every jj command auto-snapshots it. There's no add step and no index. When done, jj commit -m finalizes it and opens a fresh empty one. To split changes (the git add -p workflow), commit everything and then jj split.

2. Commits have two IDs: change_id (stable) and commit_id (mutates). In git, rewriting (rebase, amend) creates brand-new SHAs and the originals fall into reflog. In jj, the change_id is a stable identity that persists through rewrites — only the commit_id (the Git SHA equivalent) changes. Bookmarks and references survive rebases/squashes by tracking the change_id. jj evolog shows every prior commit_id of one change_id.

- name: Overprovision like the pros'
hosts: all
tasks:
- name: Install early OOM killer and zram
ansible.builtin.apt:
pkg:
- earlyoom
- zram-tools
- name: Configure early OOM killer
ansible.builtin.lineinfile:
@herissondev
herissondev / ElixirAiAgent.ex
Created August 13, 2025 14:55
Minimal AI agent in elixir
defmodule ElixirAiAgent do
@moduledoc """
A minimal ai agent implementation showcasing how simple it is to build AI agents in Elixir.
Combines agent logic and server management in one module.
"""
use GenServer
alias LangChain.Chains.LLMChain
alias LangChain.Message

Visualize primary and replicas (inspired by Waterpark)

Mix.install([
  {:kino, "~> 0.16.1"}
], consolidate_protocols: false)

Library modules

@rain-1
rain-1 / base model trends.md
Last active December 25, 2025 23:27
base model trends.md

Generating Code

Use list_generators to list available generators when available, otherwise mix help. If you have to run generator tasks, pass --yes. Always prefer to use generators as a basis for code generation, and then modify afterwards.

Tools

Use tidewave MCP tools when available, as they let you interrogate the running application in various useful ways.

Logs & Tests

@bcardarella
bcardarella / vml-swiftui.md
Last active September 3, 2025 17:17
VML - SwiftUI

View Markup Language (VML) Specification - SwiftUI

Version 1.0-alpha.1

1. Overview

View Markup Language (VML) is a markup language derived from SGML, designed to represent composable UI frameworks for unidirectional, server-driven rendering. This specification defines the conversion from a server-side view model, such as SwiftUI, to VML.

Specification Note 1.1: Scope The VML specification is concerned exclusively with the structure and rendering of views. It is a unidirectional standard (server-to-client). Mechanisms for handling user interactions, actions, and client-to-server state changes are explicitly outside the scope of this document.

@aeons
aeons / config.exs
Last active April 1, 2025 00:33
Erlang 27 :json module in Phoenix
config :phoenix, :json_library, ErlJson
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)

Have GPT-4 write a song

Mix.install(
  [
    {:midiex, "~> 0.6.1"},
    {:instructor, "~> 0.0.5"}
  ],
  config: [
    instructor: [