Skip to content

Instantly share code, notes, and snippets.

View farbod-s's full-sized avatar
🎯
Focused!

Farbod Samsamipour farbod-s

🎯
Focused!
View GitHub Profile
@farbod-s
farbod-s / llm-wiki.md
Created July 19, 2026 20:24 — 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.

@farbod-s
farbod-s / Tunnel-IPV6-Local.md
Last active September 2, 2024 12:56
Transmitting IPv6 packets over existing IPv4
@farbod-s
farbod-s / voronoi_diagram.py
Created July 25, 2024 16:50
Voronoi Diagram
# Source: https://rosettacode.org/wiki/Voronoi_diagram
# Dependency: ➜ ~ pip install pillow
from PIL import Image
import random
import math
def generate_voronoi_diagram(width, height, num_cells):
image = Image.new("RGB", (width, height))
putpixel = image.putpixel
@farbod-s
farbod-s / dns.md
Last active August 14, 2026 12:59
Public DNS servers for gaming, ad-blocking, providing security and privacy.

Public DNS Servers

Provider Primary IP Secondary IP Focus
Radar 10.202.10.10 10.202.10.11 Gaming
Shelter 94.103.125.157 94.103.125.158 Gaming
Electro 78.157.42.100 78.157.42.101 Filtering
403 10.202.10.202 10.202.10.102 Filtering
Shecan 178.22.122.100 185.51.200.2 Filtering
Begzar 185.55.226.26 185.55.225.25 Filtering
@farbod-s
farbod-s / background.js
Last active September 22, 2023 14:29
Chrome Extension: Copy values from Jobinja and paste to Google Sheets
const SPREADSHEET_ID = '{{SHEET_ID}}';
const SHEET_ID = 123456789;
const RANGE = 'ApplicantsList!A2:L2';
//----------------------
chrome.runtime.onConnect.addListener(port => {
port.onMessage.addListener(request => {
if (request.action === 'copyValues') {
const info = request.data;
writeToGoogleSheets(SPREADSHEET_ID, RANGE, [info[0], 'To Call / Email - 1', '', 'Jobinja', info[4], '', info[1], '', '', info[3], '', info[2]]);
}
@farbod-s
farbod-s / github_latest_downloader.sh
Created May 15, 2022 21:45
Download the latest release from Github repository
curl -s https://api.github.com/repos/google/bundletool/releases/latest \
| grep "browser_download_url.*jar" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
@farbod-s
farbod-s / firebase_admin_helper.py
Created May 4, 2022 18:28
Create application and download config file from Firebase console
# encoding=utf8
#----------
# AUTHOR: Farbod Samsamipour <farbod.ps@gmail.com>
# GITHUB: https://github.com/firebase/firebase-admin-python
#----------
import os
import importlib.util
import plistlib as plist
import firebase_admin
from firebase_admin import credentials, project_management
#!/bin/bash
#----------
# Set variables
sl='en'
tl=''
query=''
#----------
# Get the options
while getopts ":s:t:q:" option; do
case $option in
@farbod-s
farbod-s / dialog.html
Created August 24, 2021 00:07 — forked from arthurattwell/dialog.html
Google Sheets script to allow multi-select in cells with data-validation (adapted from https://www.youtube.com/watch?v=dm4z9l26O0I)
<div style="font-family: sans-serif;">
<? var data = valid(); ?>
<form id="form" name="form">
<? if(Object.prototype.toString.call(data) === '[object Array]') { ?>
<? for (var i = 0; i < data.length; i++) { ?>
<? for (var j = 0; j < data[i].length; j++) { ?>
<input type="checkbox" id="ch<?= '' + i + j ?>" name="ch<?= '' + i + j ?>" value="<?= data[i][j] ?>"><?= data[i][j] ?><br>
<? } ?>
<? } ?>
<? } else { ?>
# encoding=utf8
import sys, os
import requests
import json
def t5(t, e, n, i):
return abs(float(n) * float(i) / float(t) - float(e))
def number_check(t):
return t if t > 0 else 0