Skip to content

Instantly share code, notes, and snippets.

View oozoofrog's full-sized avatar

oozoofrog oozoofrog

View GitHub Profile
@oozoofrog
oozoofrog / llm-wiki.md
Created April 7, 2026 23:00 — 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.

@oozoofrog
oozoofrog / wwdc2024.py
Last active June 26, 2024 17:34
WWDC 2024 download video and subtitle and merge and translation script
import sys
import requests
import yt_dlp
import openai
def get_best_format(m3u8_url):
ydl_opts = {
'listformats': True,
}
try:
import lldb
except:
pass
import textwrap
import hashlib
from collections import namedtuple
object_register = ""
@oozoofrog
oozoofrog / NotificationConcurrencyTests.swift
Last active December 24, 2022 05:31
NotfiicationCenter+Concurrency test case
extension Notification.Name {
static let testNotification: Notification.Name = .init("TestNotification")
}
final class NotificationConcurrencyTests: XCTestCase {
func testWaitNotification() async throws {
let expect = XCTestExpectation(description: "DisposableNotification")
let queue = DispatchQueue(label: "test", attributes: .concurrent)
for _ in 0...10 {
@oozoofrog
oozoofrog / NotificationCenter+Concurrency.swift
Last active December 24, 2022 13:02
disposable notification
public extension NotificationCenter {
private class FirstReceiver: NSObject {
let notificationName: Notification.Name
init(_ name: Notification.Name) {
notificationName = name
super.init()
}
final class PreviewView: UIView, LayoutBuilding {
var capTop = true {
didSet {
UIView.animate(withDuration: 1.0) {
self.updateLayout()
}
}
}

Debugging the Swift Toolchain

Use these steps to debug components of the Swift toolchain. This allows you to see Swift's source code from the debugger – instead of disassembly. The debugger can also provide some variable names and values. This has been initially tested with libswiftCore.dylib.

These instructions were updated as of Swift 5.2.1.

Prerequisites

@oozoofrog
oozoofrog / gist:07d7eec63750c4992b09e2709f180497
Last active December 30, 2025 06:29
한글 유니코드 다루기
import Cocoa
var str = "궉토abcd스234꾹타ㅎ하후훼의"
extension Collection {
var toArray: [Element] {
return Array(self)
}
}
protocol UnicodeScalarCreatable {
@oozoofrog
oozoofrog / keybase.md
Created September 21, 2018 02:08
keybase.md

Keybase proof

I hereby claim:

  • I am rollmind on github.
  • I am rollmind (https://keybase.io/rollmind) on keybase.
  • I have a public key ASDHVKuqfnxsGNBCmHuUiLoLqU4GdFa6tJUiK3tKYF95vgo

To claim this, I am signing this object:

@oozoofrog
oozoofrog / BeAddible
Created May 16, 2018 22:07
protocol, generic, extension, conditional conformance
struct Be<Value> {
let value: Value
}
protocol BeAddible {
var be: Be<Self> { get }
}
extension Be where Value: Comparable {