Skip to content

Instantly share code, notes, and snippets.

View SamHatoum's full-sized avatar
👩‍💻
Building on Auto

Sam Hatoum SamHatoum

👩‍💻
Building on Auto
View GitHub Profile
@SamHatoum
SamHatoum / litellm-report.html
Created May 24, 2026 07:04
on.auto LiteLLM Gateway Investigation — May 24 2026: load tests, Stage A slim + Stage B deployed to live, fallback verification
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>LiteLLM Gateway Investigation — May 2026</title>
<style>
:root {
--bg: #0f1419;
--bg-card: #1c2128;
--bg-row: #161b22;
@SamHatoum
SamHatoum / cs.sh
Created May 15, 2026 19:33 — forked from jedi4ever/cs.sh
Simple script to run claude headless without the -p (to avoid extra costs)
#!/usr/bin/env bash
# Usage: ./cs "your prompt"
# Runs Claude headlessly, suppresses the TUI, prints Claude's final reply on stdout.
set -uo pipefail
PROMPT="$*"
REPLY_FILE=$(mktemp)
SESSION_ID=$(uuidgen | tr 'A-Z' 'a-z')
ENC_CWD=$(pwd | sed 's|/|-|g')
@SamHatoum
SamHatoum / microgpt.py
Created February 12, 2026 14:44 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and inference 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

🥫 The Ketchup Technique

Controlled Bursts | TDD | TCR | 100% Coverage | Emergent Design | Extreme Ownership

Core Loop

Red → Green → TCR → Refactor → TCR → Done
TCR: test && commit || revert
- Pass → commit → continue
@SamHatoum
SamHatoum / child-resolver.js
Last active January 9, 2019 16:51
GQL Child Resolver example
const { ApolloServer, gql } = require('apollo-server');
// Construct a schema, using GraphQL schema language
const typeDefs = gql`
type Query {
hello: String
order(orderId: String!): Order
}
type Order {

Keybase proof

I hereby claim:

  • I am samhatoum on github.
  • I am samhatoum (https://keybase.io/samhatoum) on keybase.
  • I have a public key ASABTKWQxZ1B5hcER0eHPAq3oqnIYASaHUcmHmSvvmnnUwo

To claim this, I am signing this object:

@SamHatoum
SamHatoum / rename-all-files.sh
Created December 16, 2016 13:09
Rename all files bash one-liner
find . -name '*.es6.js' -print0 | xargs -0 -n1 bash -c 'mv "$0" "${0/.es6.js/.js}"'
@SamHatoum
SamHatoum / chrome-driver-troubleshooting.sh
Last active January 9, 2026 21:21
Troubleshoot / Debug Chromedriver Issues
# First start chromedriver from the console like this
chromedriver --url-base=wd/hub --verbose
# Then in another tab / window: issue a command to start a new chrome session via the JSON protocol
curl -XPOST http://localhost:9515/wd/hub/session -d '{"desiredCapabilities":{"browserName":"chrome"}}'
# If you can see a chrome window pop up, you're all set. If not, check the chromedriver output and fix your issue