Skip to content

Instantly share code, notes, and snippets.

@marcisme
marcisme / microgpt.py
Created April 11, 2026 16:47 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@marcisme
marcisme / llm-wiki.md
Created April 6, 2026 22:45 — forked from karpathy/llm-wiki.md
llm-wiki

LLM Wiki

A pattern for building personal knowledge bases using LLMs.

This is an idea file, it is designed to be copy pasted to your own LLM Agent (e.g. OpenAI Codex, Claude Code, OpenCode / Pi, or etc.). Its goal is to communicate the high level idea, but your agent will build out the specifics in collaboration with you.

The core idea

Most people's experience with LLMs and documents looks like RAG: you upload a collection of files, the LLM retrieves relevant chunks at query time, and generates an answer. This works, but the LLM is rediscovering knowledge from scratch on every question. There's no accumulation. Ask a subtle question that requires synthesizing five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up. NotebookLM, ChatGPT file uploads, and most RAG systems work this way.

@marcisme
marcisme / alacritty-tmux-vim_truecolor.md
Created November 2, 2025 23:00 — forked from andersevenrud/alacritty-tmux-vim_truecolor.md
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh
@marcisme
marcisme / swift-testing-playbook.md
Created July 17, 2025 13:40 — forked from steipete/swift-testing-playbook.md
The Ultimate Swift Testing Playbook (feed it your agents for better tests!)

The Ultimate Swift Testing Playbook (2024 WWDC Edition, expanded with Apple docs from June 2025)

Updated with info from https://developer.apple.com/documentation/testing fetched via Firecrawl on June 7, 2025.

See also my blog: See also my blog post: https://steipete.me/posts/2025/migrating-700-tests-to-swift-testing

A hands-on, comprehensive guide for migrating from XCTest to Swift Testing and mastering the new framework. This playbook integrates the latest patterns and best practices from WWDC 2024 and official Apple documentation to make your tests more powerful, expressive, and maintainable.


1. Migration & Tooling Baseline

@marcisme
marcisme / claude-log.md
Created March 26, 2025 02:43
Sony lens research

I'll search for the width and length of the Sony lenses you're interested in.​​​​​​​​​​​​​​​​

Let me search for information about the 200-600mm lens dimensions:​​​​​​​​​​​​​​​​

I need to search for additional specific information about the 300mm lens dimensions:​​​​​​​​​​​​​​​​

Let me use my last search to get information about the 400mm lens dimensions:​​​​​​​​​​​​​​​​

Hi! Thanks for looking
TL;DR - trying to do anything with os_signpost, but nothing is appearing in instruments.
UPDATE: on devices it's working. Is it supposed to work in the simulator? Points of Interest are on built-in templates, I figured it should work on the device...
The app is all objc, using the C API. See at the end for a swift attempt
More details:
Creating the log like this:
@marcisme
marcisme / Info.plist
Created September 5, 2021 22:35 — forked from BalestraPatrick/Info.plist
Custom URL scheme Launch Storyboard Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
//
// MSSAssertions.swift
// FastOne
//
// Created by Marc Schwieterman on 3/8/15.
// Copyright (c) 2015 Marc Schwieterman Software, LLC. All rights reserved.
//
import Foundation
@marcisme
marcisme / karabiner.json
Created June 26, 2017 03:30
Karabiner Elements Config
{
"profiles": [
{
"complex_modifications": {
"rules": [
{
"manipulators": [
{
"description": "Change caps_lock to control when used as modifier, escape when used alone",
"from": {
class KeyboardDodger {
private struct KeyboardValues {
private let userInfo: [AnyHashable : Any]
init(notification: Notification) {
userInfo = (notification as NSNotification).userInfo!
}