Skip to content

Instantly share code, notes, and snippets.

View leodutra's full-sized avatar
🦙
Llama and other LLMs

Leo Dutra leodutra

🦙
Llama and other LLMs
View GitHub Profile
@leodutra
leodutra / llm-wiki.md
Created April 8, 2026 21:59 — 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.

@leodutra
leodutra / .block
Created February 4, 2026 03:34 — forked from vasturiano/.block
Timelines Chart
height: 700
scrolling: yes
@leodutra
leodutra / js_bitwise_hacks.md
Created April 2, 2025 22:43 — forked from everget/js_bitwise_hacks.md
A comprehensive guide to advanced bitwise manipulation techniques in JavaScript, featuring concise code snippets demonstrating clever bit-level operations for solving various programming challenges.
@leodutra
leodutra / HttpStatusCode.ts
Created September 27, 2024 05:27 — forked from scokmen/HttpStatusCode.ts
Typescript Http Status Codes Enum
"use strict";
/**
* Hypertext Transfer Protocol (HTTP) response status codes.
* @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}
*/
enum HttpStatusCode {
/**
* The server has received the request headers and the client should proceed to send the request body
@leodutra
leodutra / useIntersectionObserver.ts
Last active October 23, 2024 19:15
useIntersectionObserver - use intersection observer
import { type RefObject, useEffect, useState } from 'react';
export type IntersectionObserverOptions = IntersectionObserverInit & {
intersectOnce?: boolean;
skip?: boolean;
};
const emptyOptions: IntersectionObserverInit = {};
const useIntersectionObserver = (
@leodutra
leodutra / ed_notes.md
Created February 7, 2024 05:34 — forked from corenting/ed_notes.md
Elite: Dangerous APIs findings
@leodutra
leodutra / obsidian-linux.md
Last active April 5, 2026 14:01
Obsidian free sync using Google Drive on Ubuntu + Android

Ubuntu

Mount rclone sync

This config allows us to mount obsidian folder locally, preventing issues with Google Drive hashes

# create obsidian folder on Google Drive, then
# install rclone
curl https://rclone.org/install.sh | sudo bash
@leodutra
leodutra / rust-ubuntu-dev-env-2023.md
Last active June 12, 2024 00:22
Rust + Ubuntu Dev Env 2023 + utillities / tools / cli / plugins / cargo / components / sub commands

Install steps

# update the system
sudo apt update && sudo apt upgrade -y

# install minimal dev stuff
sudo apt install -y \
	build-essential \
	ca-certificates \
@leodutra
leodutra / alacritty.yml
Created June 12, 2023 08:41
Alacritty/NuShell/Starship Settings
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
# This value is used to set the `$TERM` environment variable for
# each instance of Alacritty. If it is not present, alacritty will
@leodutra
leodutra / isMobile.js
Last active May 5, 2023 17:57
Detect if browser is mobile - JavaScript - using feature detection
const hasCoarsePointer = () => window.matchMedia("(pointer: coarse)").matches
const hasMobileWidth = (maxWidth = 639) =>
window.matchMedia(`(max-width: ${maxWidth}px)`).matches
const hasMultipleTouchPoints = () => navigator.maxTouchPoints > 1
const hasTouchEvents = () => "ontouchstart" in document.documentElement
export const isMobile = ({ maxWidth } = {}) => {
return (
hasCoarsePointer() &&
hasMultipleTouchPoints() &&