Skip to content

Instantly share code, notes, and snippets.

View samuelpatro's full-sized avatar
🖖

Samuel samuelpatro

🖖
View GitHub Profile
@samuelpatro
samuelpatro / llm-wiki.md
Created May 10, 2026 11:25 — 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.

@samuelpatro
samuelpatro / instagramliker.js
Created February 8, 2025 21:18
instagram stories liker
let likes = 0;
let autoLike = setInterval(() => {
const heart = document.querySelector('svg[aria-label="Like"]');
const arrow = document.querySelector('svg[aria-label="Next"]');
if (heart) {
window.scrollTo(0, document.body.scrollHeight);
heart.parentNode.click();
likes++;
console.log(`You've liked ${likes} post(s)`);
}
<?php namespace Classes\Api;
use DateTime;
use Exception;
use \GuzzleHttp\Client as GuzzleHttp;
use GuzzleHttp\Exception\BadResponseException;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Exception\ServerException;
<?php
use October\Rain\Support\Collection;
use Genkgo\Camt\Config as GenkgoConfig;
use Genkgo\Camt\Reader as GenkgoReader;
use Money\Currencies\ISOCurrencies;
use Money\Formatter\DecimalMoneyFormatter;
class PaymentsParse
configureWebpack: {
entry: {
app: [
'./src/assets/scss/app.scss'
]
},
resolve: {
alias: {
'components': path.join(__dirname, '/src/components'),
}
@echo off
:start
e:\steamcmd\steamcmd.exe +login anonymous +force_install_dir e:\rustserver\ +app_update 258550 -beta staging +quit
:juststart
RustDedicated.exe -batchmode -server.port 28015 -server.hostname "My Server" ^
-rcon.port 28016 ^
-rcon.password "password" ^
-rcon.web 1 ^
-server.description "Hey I did a thing" ^
-server.url "Your web page or discord link" ^
@samuelpatro
samuelpatro / autoloader.js
Last active June 5, 2018 12:56
Autoload *.gql / *.graphql files
const contextQuery = require.context('./queries', true, /\.(gql|graphql)$/)
const query = {}
contextQuery.keys().forEach((filename) => {
const queryKey = filename.split('/').pop().replace(/.gql|.graphql/i, '')
query[queryKey] = contextQuery(filename)
})
export default query
@samuelpatro
samuelpatro / filters.js
Last active June 16, 2021 16:20
Simple filters for VueJs 2
import Vue from 'vue'
// Truncate
Vue.filter('truncate', function (text, length = 30, clamp = '...') {
if (text.length <= length) {
return text
} else {
return text.substring(0, length) + clamp
}
})
@samuelpatro
samuelpatro / green.cfg
Created August 20, 2017 08:10
Greenscreen CSGO (exec green)
sv_cheats 1
alias fogon "fog_override 1; fog_maxdensity 1500; fog_color 0 255 0; fog_start 0; fog_end 1; bind p fogoff"
alias fogoff "fog_override 0; bind p fogon"
bind p fogon
{
"editor.minimap.enabled": true,
"files.associations": {
"*.vue": "vue"
},
"eslint.enable": true,
"eslint.options": {
"extensions": [
".html",
".js",