Skip to content

Instantly share code, notes, and snippets.

View zulnabil's full-sized avatar
Always learning

Zulnabil Faiz Moh. Alhadad zulnabil

Always learning
View GitHub Profile
@zulnabil
zulnabil / llm-wiki.md
Created April 4, 2026 18:05 — 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.

@zulnabil
zulnabil / contracts...ErcPredictionMarket.sol
Created June 26, 2024 18:02
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.26+commit.8a97fa7a.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
// Using SafeERC20 for IERC20 tokens to safely interact with ERC20 tokens.
using SafeERC20 for IERC20;
contract PredictionMarket {
@zulnabil
zulnabil / contracts...ErcPredictionMarket.sol
Created June 26, 2024 18:02
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.26+commit.8a97fa7a.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
using SafeERC20 for IERC20;
contract PredictionMarket {
enum EventType { Single, Multiple }
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Personal Site PWA</title>
<meta name="description" content="Personal Site PWA"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/materialize.min.css">
</head>
<body>
@zulnabil
zulnabil / App.js
Created June 28, 2019 13:00
Component App
import React from 'react';
import ScoreBoard from './components/ScoreBoard'
function App() {
return (
<div>
<ScoreBoard />
</div>
);
@zulnabil
zulnabil / ScoreBoard.jsx
Created June 28, 2019 12:54
Component ScoreBoard
import React from 'react'
import styled from 'styled-components'
import PanelScoreboard from './PanelScoreboard'
import InputTeam from './InputTeam'
const PanelScore = styled.div`
display: ${props => props.ready ? 'block' : 'none'}
`
@zulnabil
zulnabil / InputTeam.jsx
Created June 28, 2019 12:42
Component InputTeam
import React from 'react'
import styled from 'styled-components'
const PanelInputTeam = styled.div`
width: 400px;
margin: auto;
display: ${props => props.ready ? 'none' : 'flex'}
flex-direction: column;
justify-content: space-around;
`
@zulnabil
zulnabil / PanelScoreboard.jsx
Last active June 28, 2019 12:43
Component PanelScoreboard
import React from 'react'
import styled from 'styled-components'
import Score from './Score'
import Timer from './Timer'
import Foul from './Foul'
const Container = styled.div`
width: 500px;
@zulnabil
zulnabil / Foul.jsx
Last active June 28, 2019 12:39
Component Foul
import React from 'react'
import styled from 'styled-components'
const ObjFoul = styled.div`
text-align: center;
`
const PointFoul = styled.div`
font-size: 24pt;
`
@zulnabil
zulnabil / Score.jsx
Last active June 28, 2019 12:40
Component Score
import React from 'react'
import styled from 'styled-components'
const ObjScore = styled.div`
text-align: center;
`
const NameTeam = styled.div`
font-size: 18pt;
`