Skip to content

Instantly share code, notes, and snippets.

View Sueaty's full-sized avatar
💭
think Sueaty think...

sueaty.cho Sueaty

💭
think Sueaty think...
View GitHub Profile
@Sueaty
Sueaty / llm-wiki.md
Created April 7, 2026 15:28 — 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.

@objc private func keyboardWillShow(_ notification: Notification) {
guard let userInfo = notification.userInfo,
let keyboardFrame = userInfo[UIResponder.keyboardFrameEndUserInfoKey] as? CGRect else {
return
}
let keyboardHeight = keyboardFrame.height
if contentTextView.isFirstResponder {
bottomConstraint.constant = keyboardHeight + 10
}
// Dismiss Keyboard : endEditing(_:)
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
view.endEditing(true)
}
// Dismiss Keyboard : resignFirstResponder()
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
var foundFirstResponder: Bool = false
for subview in view.subviews where !foundFirstResponder {
@Sueaty
Sueaty / ClosureStrongReferenceCycle.swift
Created October 22, 2020 19:57
[Medium] closure strong reference cycle
class HTTPResponseStatusCode {
let code: Int
let text: String?
lazy var description: () -> String = {
if let text = self.text {
return "\(self.code) : \(text)"
} else {
return "\(self.code) : Success"
}
@Sueaty
Sueaty / StrongReferenceCycle.swift
Last active October 22, 2020 19:33
[Medium] strong reference cycle example
class Person {
let name: String
init(name: String) {
self.name = name
print("\(name) : initialized")
}
var car: Car?
deinit {
print("\(name) : deinitialized")
}
@Sueaty
Sueaty / SceneDelegate.swift
Created October 18, 2020 10:19
Changing the root view controller in SceneDelegate
import UIKit
class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
var user: User?
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard let _ = (scene as? UIWindowScene) else { return }
let userIsActive = checkForActiveUserInfo()
@Sueaty
Sueaty / MainViewController.swift
Created October 18, 2020 08:51
Checking ViewController lifecycle in navigation controller
import UIKit
class ViewController: UIViewController {
// MARK:- View Lifecycle
override func loadView() {
super.loadView()
print("Main loadView called")
}
@Sueaty
Sueaty / Card.swift
Created September 9, 2020 16:41
Protocol Sendable, Receivable(Player-Dealer-CardDeck)
class Card {
enum Symbol: String, CaseIterable {
case spades = "♠️", hearts = "♥️", diamonds = "♦️", clubs = "♣️", joker = "🃏"
}
enum Rank: Int, CaseIterable {
case A = 1, two, three, four, five, six, seven, eight, nine, ten, J, Q, K
}
private let symbol: Symbol