Skip to content

Instantly share code, notes, and snippets.

View thurendous's full-sized avatar
🏀
No game no life

MW thurendous

🏀
No game no life
View GitHub Profile
@thurendous
thurendous / llm-wiki.md
Created May 6, 2026 06:39 — 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.

@thurendous
thurendous / buy_me_a_coffee.vy
Last active January 8, 2025 04:56
This contract is for creating a sample funding contract written in Vyper.
# pragma version 0.4.0
"""
@license MIT
@title Buy Me A Coffee!
@author Me
@notice This contract is for creating a sample funding contract
"""
# sepolia testnet chainlink eth / usd: 0x694AA1769357215DE4FAC081bf1f309aDC325306
@thurendous
thurendous / ContractInBytecode.sol
Created August 27, 2023 01:50
try to create a contract in byte code
// MIT
pragma solidity ^0.8.13;
// Runtime code
// Creation code
// Factory code
contract Factory {
@thurendous
thurendous / pythonCheckFunctionSelector.py
Created August 26, 2023 06:32
This is a script to check if there are function selector's collision.
from web3 import Web3
import os
import hashlib
# Function to extract signatures
def extract_function_signatures(src):
lines = src.split("\n")
function_lines = [
line.strip() for line in lines if line.strip().startswith("function")
@thurendous
thurendous / DecentralizedStablecoin.sol
Created July 18, 2023 00:47
This is an example of how to create a stablecoin in solidity. There is some useful comments in the beginning of the code also.
// SPDX-License-Identifier: MIT
// This is considered an Exogenous, Decentralized, Anchored (pegged), Crypto Collateralized low volitility coin
// Layout of Contract:
// version
// imports
// errors
// interfaces, libraries, contracts
// Type declarations
@thurendous
thurendous / AboutEncoding.sol
Last active July 10, 2023 14:47
About encodings in solidity and talking about how they work.
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
// For the cheatsheet, check out the docs: https://docs.soliditylang.org/en/v0.8.13/cheatsheet.html?highlight=encodewithsignature
contract Encoding {
function combineStrings() public pure returns (string memory) {
return string(abi.encodePacked("Hi Mom! ", "Miss you."));
}
@thurendous
thurendous / create2.sol
Created February 14, 2023 02:00
Deploy and predict the address using create2
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.14;
//Use Create2 to know contract address before it is deployed.
contract DeployWithCreate2 {
address public owner;
constructor(address _owner) {
owner = _owner;
}
}
contract Create2Factory {
@thurendous
thurendous / getMumbaiMaticToken.js
Created October 31, 2022 12:02
Get Mumbai Matic Token
import fetch from ‘node-fetch’;
const getAddress = () => {
const address = process.argv[2];
if (!address) {
console.log(`Please add the address as script argument`);
process.exit(1);
}
return address;
};
const getMatic = async (address) => {
@thurendous
thurendous / TODO_LIST.md
Last active October 29, 2022 14:28
The todo-list and ideas for Omaeno

TODOs

  • Create a page to function as calculator for units like ether, gwei or wei.
    • Create a Unit Converter for USDT/USDC(decimal 6)
    • Create a coppy button
    • create a hex->10 function
  • Create an article to show how to understand the Crypto scene's languages including memes
  • Create a webhook to integrate with discord
  • Create a function for searching
  • Create a twitter bot to tweet about JPYC whale alert
  • Pull uniswap price data as oracle data into website page
@thurendous
thurendous / MultiSigWallet.sol
Last active July 2, 2022 02:04
A multi-sig wallet example for study
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
contract MultiSigWallet {
event Deposit(address indexed sender, uint amount );
event Submit(uint indexed txId);
event Approve(address indexed owner, uint indexed txId);
event Revoke(address indexed owner, uint indexed txId);
event Execute(uint indexed txId);