Skip to content

Instantly share code, notes, and snippets.

View embassem's full-sized avatar
🎯
Focusing

Bassem Tourky embassem

🎯
Focusing
View GitHub Profile

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.

@zoltan-magyar
zoltan-magyar / xcode-claude-code-third-party.md
Last active April 14, 2026 16:09
Xcode Claude Code integration with third-party APIs

Setting Up Xcode Claude Code with Third-Party API Endpoints

This guide explains how to configure Xcode's built-in Claude Code integration to work with third-party API endpoints instead of the official Anthropic API. You need macOS 26.2+ and Xcode 26.3+ for the Claude Code integration.

Step 1: Install Claude Code component in Xcode

You need to first install Xcode's own Claude Code instance, with its own Claude Code binary.

Xcode Settings -> Intelligence -> Anthropic -> Claude Agent -> press Get button

@MRKMKR
MRKMKR / docker-compose.yml
Created October 24, 2025 13:26
Using GLM-4.6 with Xcode 26 via LiteLLM Proxy
services:
litellm:
image: ghcr.io/berriai/litellm:main-latest
container_name: glm-proxy
ports:
- "4000:4000"
volumes:
- ./litellm_config.yaml:/app/config.yaml
command: --config /app/config.yaml
restart: unless-stopped
@AlexKobachiJP
AlexKobachiJP / XcodeCommand
Last active June 1, 2024 20:26
Sort file and package references in an Xcode project.
// Copyright © 2023 Alex Kovács. All rights reserved.
import ArgumentParser
import Foundation
import PathKit
import XcodeProj
// See below for `MainCommand` skeleton.
extension MainCommand {
struct XcodeCommand: ParsableCommand {
@lukaskubanek
lukaskubanek / Bundle+TestFlight.swift
Last active September 29, 2025 14:26
A code snippet for detecting the TestFlight environment for a macOS app at runtime
/// MIT License
///
/// Copyright (c) 2021 Lukas Kubanek, Structured Path GmbH
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the Software is
/// furnished to do so, subject to the following conditions:
//
// CardPagingLayout.swift
//
// Created by Ahmed Fathi on 5/29/20.
// Copyright © 2020 Ahmed Fathi. All rights reserved.
//
import UIKit
class CardPagingLayout: UICollectionViewLayout {
@SergLam
SergLam / UIApplication+Environment.swift
Created January 16, 2020 18:56
Swift - check iOS app environment (debug OR TestFlight build) at runtime
import UIKit
extension UIApplication {
// MARK: Public
func isRunningInTestFlightEnvironment() -> Bool {
if isSimulator() {
return false
} else {
if isAppStoreReceiptSandbox() && !hasEmbeddedMobileProvision() {
@sukov
sukov / CodableExtension.swift
Last active January 28, 2026 12:55 — forked from mikebuss/decode-json-swift.swift
Codable (Encode & Decode) [Any] and [String: Any] Swift 5
// Original: https://gist.github.com/loudmouth/332e8d89d8de2c1eaf81875cfcd22e24
import Foundation
private struct JSONCodingKeys: CodingKey {
var stringValue: String
init(stringValue: String) {
self.stringValue = stringValue
}
@beloso
beloso / flat-swift4-noncaching.stencil
Created May 8, 2018 16:04
SwiftGen non caching Strings template
// Generated using SwiftGen, by O.Halligon — https://github.com/SwiftGen/SwiftGen
{% if tables.count > 0 %}
{% set accessModifier %}{% if param.publicAccess %}public{% else %}internal{% endif %}{% endset %}
import Foundation
// swiftlint:disable superfluous_disable_command
// swiftlint:disable file_length
{% macro parametersBlock types %}{% filter removeNewlines:"leading" %}
{% for type in types %}
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://docs.fastlane.tools/actions
# can also be listed using the `fastlane actions` command
# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`
# If you want to automatically update fastlane if a new version is available:
# update_fastlane