Skip to content

Instantly share code, notes, and snippets.

"""
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
Jamie's questions for local sync engines:
1. Consistency relationship vs. server-side strictly serializable
2. Server-side programming. How easily can types be shared.
3. Long-histories, efficiency (and document size limits) for many deltas
4. Schema evolution: how to manage migrations on server-side tables, and
story for client side migrations (wipe everything)?
5. General protocol evolution. As sync protocol changes, how are locally
cached values discarded/evolved?
6. General "inconsistency" stuff, where server causes reset. Is it baked in?
@remorses
remorses / plan-to-build.ts
Created October 2, 2025 08:50
Opencode plugin to automatically implement GPT-5 agent plan with Opus build agent
// GPT-5 is very good at exploring a code base and creating plans but very bad at actually writing readable code
// Sonnet and Opus are the opposite: very bad at architecture but good at implementing readable and nice code
// this plugin automatically implements plan agent messages using Opus so that you can always use GPT5 Codex in plan mode and have Opus implement the plan autoamtically
import type { Plugin } from "@opencode-ai/plugin";
export const PlanToBuildPlugin: Plugin = async ({ client }) => {
const sessionsWithErrors = new Set<string>();
const processedSessions = new Set<string>();
@remorses
remorses / websearch.ts
Created September 19, 2025 11:45
Google web search for opencode
import { tool } from "@opencode-ai/plugin";
import { createGoogleGenerativeAI } from "@ai-sdk/google";
import { generateText } from "ai";
const google = createGoogleGenerativeAI({
apiKey: process.env.GEMINI_API_KEY!,
});
export default tool({
@mex7xx
mex7xx / brew-bundle-brewfile-tips.md
Created September 18, 2025 20:21 — forked from ChristopherA/brew-bundle-brewfile-tips.md
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@EvanBacon
EvanBacon / CLAUDE.md
Created July 22, 2025 16:43
Expo Router CLAUDE.md file.

Architecture

  • Website: Expo Router website with Tailwind.
  • Native app: Expo Router app with CNG.
  • Backend: Expo API routes WinterTC-compliant. Routes are in src/app/api/ directory. API routes use +api.ts suffix (chat+api.ts).
  • Secrets: Use .env files and API routes for secret management. Never use EXPO_PUBLIC_ prefix for sensitive data.

Code Style

  • Use TypeScript whenever possible.
@wesleyegberto
wesleyegberto / tailwind-css-cheatsheet.css
Last active April 25, 2026 17:02
Tailwind CSS Cheatsheet
/* *******************************************************************************************
* TAILWIND.CSS
* DOCUMENTATION: https://tailwindcss.com/
*
* Original file can be seen here: https://github.com/LeCoupa/awesome-cheatsheets/blob/master/frontend/tailwind.css
* ******************************************************************************************* */
/*
* Available breakpoints
* --------------------
#!/bin/sh
# the file containing this gist must be executable
# chmod +x FILENAME.sh
# xattr -d com.apple.quarantine FILENAME.sh
echo "Please login to your Apple Account through the Mac App Store"
echo "When logged in sucessfully press [ENTER} to continue"
read
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active May 6, 2026 12:55
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.