Skip to content

Instantly share code, notes, and snippets.

View CyberStrike's full-sized avatar
🎯
Building Products

Chris Scott CyberStrike

🎯
Building Products
View GitHub Profile
@CyberStrike
CyberStrike / microgpt.py
Created April 8, 2026 16:47 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@CyberStrike
CyberStrike / llm-wiki.md
Created April 8, 2026 16:34 — forked from rohitg00/llm-wiki.md
LLM Wiki v2 — extending Karpathy's LLM Wiki pattern with lessons from building agentmemory

LLM Wiki v2

A pattern for building personal knowledge bases using LLMs. Extended with lessons from building agentmemory, a persistent memory engine for AI coding agents.

This builds on Andrej Karpathy's original LLM Wiki idea file. Everything in the original still applies. This document adds what we learned running the pattern in production: what breaks at scale, what's missing, and what separates a wiki that stays useful from one that rots.

What the original gets right

The core insight is correct: stop re-deriving, start compiling. RAG retrieves and forgets. A wiki accumulates and compounds. The three-layer architecture (raw sources, wiki, schema) works. The operations (ingest, query, lint) cover the basics. If you haven't read the original, start there.

@CyberStrike
CyberStrike / path.md
Created July 2, 2019 18:46
Split items in your shell path per line
echo $PATH | tr ":" "\n"
@CyberStrike
CyberStrike / install.sh.md
Last active July 12, 2020 17:29
OSX 10.14 Mojave - Install Php 7.4 w/ Phpbrew
#!/usr/bin/env bash

export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig"

phpbrew --debug install 7.4 \
 +default \
 +dbs \
 +openssl="$(brew --prefix openssl)" \
 +bz2="$(brew --prefix bzip2)" \
@CyberStrike
CyberStrike / _exists.md
Last active July 3, 2019 18:59
Utility function for checking if a value is truthy
function _exists (thing) {
  const IS_UNDEFINED = 'undefined' === (typeof thing)
  const IS_NULL      = null === thing
  if (IS_UNDEFINED || IS_NULL) return false

  const TYPE = (typeof thing)
  const IS_OBJECT = ('object' === TYPE)
  const IS_STRING = ('string' === TYPE)
 const IS_NUMBER = ('number' === TYPE)
git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -d
@CyberStrike
CyberStrike / bootstrap-pagination.php
Last active May 17, 2017 03:26 — forked from ediamin/bootstrap-pagination.php
Bootstrap Pagination for WordPress
<?php
/*
* custom pagination with bootstrap .pagination class
* source: http://www.ordinarycoder.com/paginate_links-class-ul-li-bootstrap/
*/
function bootstrap_pagination( $custom_query = null, $echo = true ) {
global $wp_query;
$pagination = '';
@CyberStrike
CyberStrike / ColorFunctions.php
Last active April 26, 2017 06:13
PHP Color Functions
<?php
function rgbToHsl(int $r,int $g, int $b ) {
$oldR = $r;
$oldG = $g;
$oldB = $b;
$r /= 255;
$g /= 255;
$b /= 255;
@CyberStrike
CyberStrike / rewritinghistory.sh
Created February 13, 2015 21:47
remove a file from history
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch FILENAME' SHA1..HEAD
@CyberStrike
CyberStrike / .bash_profile
Created December 14, 2014 21:35
My .bash_profile
# Source Git
source /c/'Program Files (x86)'/git/etc/git-completion.bash
source /c/'Program Files (x86)'/git/etc/git-prompt.sh
# Reset
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red