Skip to content

Instantly share code, notes, and snippets.

View gravataLonga's full-sized avatar
🤓
Zig Nerding

Jonathan Fontes gravataLonga

🤓
Zig Nerding
View GitHub Profile
@gravataLonga
gravataLonga / llm-wiki.md
Last active July 3, 2026 19:51 — 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.

<div style="position:absolute;top:-999px;left:-999px">
<svg
id="effectSvg"
width="200"
height="200"
viewBox="0 0 200 200"
xmlns="http://www.w3.org/2000/svg">
<filter id="displacementFilter4">
@gravataLonga
gravataLonga / main_test.go
Created October 28, 2022 22:15
Testing Overlapping date
package main
import (
"fmt"
"testing"
)
func TestOverlappingDate(t *testing.T) {
tests := []struct {
beginDateA string
@gravataLonga
gravataLonga / sodium.php
Last active December 16, 2020 15:47
sodium short usage
<?php
// Symmetric Encription
$msg = "ola";
$key = random_bytes(SODIUM_CRYPTO_SECRETBOX_KEYBYTES);
$nonce = random_bytes(SODIUM_CRYPTO_SECRETBOX_NONCEBYTES);
$cypher_text = sodium_crypto_secretbox($msg, $nonce, $key);
$plain_text = sodium_crypto_secretbox_open($cypher_text, $nonce, $key);
@gravataLonga
gravataLonga / hashes.js
Last active February 16, 2021 14:13
Library to handle Hash of URL.
let hashes = function () {
let _this = this;
let _SEPERATOR_KEY_VALUE = ":";
let _SEPERATOR_PAIR = "|";
this._OLD_HASHES = {};
@gravataLonga
gravataLonga / attemp.txt
Created July 4, 2019 13:03
attempped 301 brute force
103.115.42.179 - - [04/Jul/2019:13:40:43 +0100] "GET / 301
103.115.42.179 - - [04/Jul/2019:13:40:43 +0100] "GET /robots.txt 301
103.115.42.179 - - [04/Jul/2019:13:40:44 +0100] "POST /App2f2e3eb2.php 301
103.115.42.179 - - [04/Jul/2019:13:40:44 +0100] "GET /webdav/ 301
103.115.42.179 - - [04/Jul/2019:13:40:45 +0100] "GET /help.php 301
103.115.42.179 - - [04/Jul/2019:13:40:45 +0100] "GET /java.php 301
103.115.42.179 - - [04/Jul/2019:13:40:45 +0100] "GET /_query.php 301
103.115.42.179 - - [04/Jul/2019:13:40:46 +0100] "GET /test.php 301
103.115.42.179 - - [04/Jul/2019:13:40:46 +0100] "GET /db_cts.php 301
103.115.42.179 - - [04/Jul/2019:13:40:47 +0100] "GET /db_pma.php 301
@gravataLonga
gravataLonga / tips.txt
Created February 13, 2019 21:30
Proxy all conections to remote server with SSH
ssh -D 0.0.0.0:8888 user@remoteserver
@gravataLonga
gravataLonga / TableResult.js
Last active August 13, 2018 15:36
Table Result - Create a table on the fly with js
/**
* Usage:
* On the template, create the following html.
* <table class="table" data-table="dates" data-empty=".is-empty"><thead><tr><th data-key="Id"></th><th data-key="Media.0.LowRs|Media.0.HigRs" data-type="image"></tr></thead></table>
* <div class="is-empty" style="display:none;">The result was empty</div>
*
* Then, on the result of callback ajax request, call like TableResult('dates', result); Tadah!!!
* The rest is magic!
*/
(function($) {
@gravataLonga
gravataLonga / secure-my-server.sh
Created June 13, 2018 16:22
Securing my server Script
#!/bin/bash
set -o errexit
# Disclaimer: This is not the most secure configuration possible. This script
# is intended only to be more secure than the default configuration. No
# promises are made about this script preventing your server from getting
# owned or your bike getting stolen. The bad guys are still out to get you.
# And running this script does not excuse you from writing secure application
# code!
@gravataLonga
gravataLonga / compile-go.bash
Created June 11, 2018 11:15
Go Multiple Compile Os
#!/usr/bin/env bash
package=$1
if [[ -z "$package" ]]; then
echo "usage: $0 <package-name>"
exit 1
fi
package_split=(${package//\// })
package_name=${package_split[-1]}