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 / install-fabric-ai-arch.bash
Last active May 13, 2026 01:38
Install Fabric AI on Arch Linux
sudo pacman -S --needed base-devel git pkgconf cmake make gcc
# Install Paru
if ! command -v paru >/dev/null 2>&1; then
git clone https://aur.archlinux.org/paru.git
cd paru || exit
makepkg -si
fi
# Install Fabric AI + dependencies
@leodutra
leodutra / rust-dev-env-install-arch.bash
Last active May 12, 2026 22:11
Rust Dev Env Install - 2026 - Arch Linux
#!/usr/bin/env bash
set -euo pipefail
# ============================================================
# Rust development environment bootstrap (Arch Linux + zsh)
# ============================================================
# ------------------------------------------------------------
# Helpers
# ------------------------------------------------------------
@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 / omarchy-dev-env.bash
Last active May 12, 2026 23:00
Minimal Omarchy Developer Environment Install
#!/usr/bin/env bash
# sets MAKEFLAGS in /etc/makepkg.conf
# so makepkg (AUR/package builds) uses all CPU cores minus one for faster compilation
sudo bash -c 'grep -q "^MAKEFLAGS=" /etc/makepkg.conf && sed -i "/^MAKEFLAGS=/c\MAKEFLAGS=\"-j$(( $(nproc) - 1 ))\"" /etc/makepkg.conf || echo "MAKEFLAGS=\"-j$(( $(nproc) - 1 ))\"" >> /etc/makepkg.conf'
# ------------------------------------------------------------
# Helpers
# ------------------------------------------------------------
zshrc_append() {
@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