Skip to content

Instantly share code, notes, and snippets.

View jasondavis's full-sized avatar

Jason Davis jasondavis

View GitHub Profile
@jasondavis
jasondavis / GitHubFolderToGist-v1.1.2 - iOS_Scriptable
Last active September 1, 2026 01:26
GitHubFolderToGist-v1.1.2 - iOS_Scriptable
/**
* File: GitHubFolderToGist-v1.1.2.js
* Version: 1.1.2
* Description:
* Select a folder or ZIP archive from iOS Files and publish its contents as
* a GitHub Gist. Nested paths are flattened into Gist-safe filenames.
*
* Features:
* - Select an iOS Files folder or a .zip archive.
* - Recursively includes files from nested folders.
@chapterthreee
chapterthreee / reddit_full_capture.py
Created August 24, 2026 01:07
Read-only Reddit thread capture utility
import json
import os
import sys
import getpass
from datetime import datetime, timezone
import praw
from praw.models import MoreComments

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.

@jasondavis
jasondavis / microgpt.py
Created February 12, 2026 02:09 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and inference 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
@karpathy
karpathy / microgpt.py
Last active September 16, 2026 09:52
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
@jasondavis
jasondavis / RaindropTemplaterTemplate
Created September 9, 2025 19:34 — forked from rwmyers/RaindropTemplaterTemplate
Raindrop / Obsidian Integration
<%*
let raindrop = tp.user.raindrop;
let collections = await raindrop.collections();
let collection = await tp.system.suggester((item) => item.title, collections);
let raindrops = await raindrop.raindrops(collection._id);
let drop = await tp.system.suggester((item) => item.title, raindrops);
drop = await raindrop.raindrop(drop._id);
let title = drop.title
let url = drop.link
@jasondavis
jasondavis / index.html
Last active June 11, 2025 01:21
Multi-Tag Selector with Alphabetical Tag Lists and Tag Sets by Category
<div id="tagSelector"></div>
#!/bin/bash
# 1: Define backup filenames with timestamps.
db_backup_name="wp-db-backup-$(date +%d-%m-%Y-%H.%M).sql.gz"
wpfiles_backup_name="wp-content-backup-$(date +%d-%m-%Y-%H.%M).tar.gz"
# 2: Database connection info.
db_name="wordpress"
db_username="wordpress"
db_password="wordpress123"
@nicolevanderhoeven
nicolevanderhoeven / getCampaignList.js
Created August 9, 2024 14:02
Writes Dataview query results to a Markdown note in Obsidian
function getNumOfGames(campaign) {
let numOfGames = app.plugins.plugins.dataview.api
.pages(`"ttrpgs/${campaign}"`)
.where(page => {
if (page.type === 'session') {
if (page.campaign === campaign) {
return true;
}
}
}).length
type project
status 🟡
description Miscellaneous personal tasks
aliases
#p/personal

I use the project file to track tasks for a given project. I use tags like #p/personal to associate a task to a project. The alias in the YAML front matter allows me to navigate to this tasks page by clicking on the tag from a tasks query.