Skip to content

Instantly share code, notes, and snippets.

@ggorlen
ggorlen / clean-ubuntu.bash
Created October 14, 2026 18:02
clean-ubuntu.bash
# clean my ubuntu machine https://chatgpt.com/c/69aa0695-42ac-8329-8688-3684685e14fd
# Find the largest directories in your home folder
du -h --max-depth=1 ~ 2>/dev/null | sort -hr
# Find large files over 500 MB
find ~ -type f -size +500M -exec ls -lh {} \; 2>/dev/null
# Clear rebuildable caches (packages and browser binaries may need redownloading)
rm -rf ~/.cache/yarn ~/.cache/puppeteer ~/.cache/pip ~/.cache/ms-playwright
@ggorlen
ggorlen / stamp-generator.html
Created September 20, 2026 03:32
stamp-generator.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Greg Stamp</title>
<style>
body {
display: flex;
justify-content: center;
align-items: center;
@ggorlen
ggorlen / eng-values.md
Last active November 5, 2026 19:35
engineering values

Here are my eng values (jotted down, WIP)

  • fast iteration loops, merge into main and deploy often. I'm a big believer in the quantity vs quality paradox.
  • get strong observability right away, should be able to query database, run code in prod console, access datadog, everything hooked up to LLMs
  • look for the key metrics to measure work impact, figure out what's highest leverage, and establish acceptance checks for changes
  • understand which are the key customers and what their needs and pain points are, understand as much biz context as possible/useful--who are our competitors, what are they doing?
  • don't tolerate broken/flaky CI, fix/improve it right away
  • don't tolerate broken/flaky anything in the product or dev ex, fix/improve it right away, if possible
  • take action if something can be improved. now with LLMs it's generally easy to just fix stuff ~instantly instead of going through a sprint planning committe
@ggorlen
ggorlen / how-i-use-computers.md
Last active October 16, 2026 03:02
how i use computers

How I Use Computers

Motivation: I often notice when standing alongside someone else that their workflow of navigating a computer differs from mine. Often, I learn new tricks from them, while other times I want to tell them about some keystroke shortcut.

Here's some tips for how I use computers to canonize the process.

General

  • I usually avoid desktop apps in favor of browser apps
  • If I have too many browser tabs open I move them to a google sheet organizer I always have running in a tab. The sheet eventually overflows and I move stuff to large markdown files. probably not the best system although it's an easy enough way to be able to find things if I need them someday, which I often do.
@ggorlen
ggorlen / thaumaturgy.md
Last active July 20, 2026 16:41
thaumaturgy

Predawn

last couple chords change a bit, TODO tab out the rest.

-----------------------------------------------------------
-5---------5---------5-------------------------------------
-2-4-------2-4-------2-4---------------------------------2-
---2-5-------2-5-------2-5-----------------------------2---
-----3-5-------2-5-------3-5-------------------------0-----
@ggorlen
ggorlen / novice-javascript-qa.md
Last active October 15, 2026 22:40
Novice JavaScript: the Q&A App

Novice JavaScript: the Q&A App

Context

This article discusses strategies for teaching 100% novice programmers with JavaScript--the very first program and next steps after it. Primary audience is grade and high school students, but also adults.

Problem: the quiz app

For new programmers, particularly kids, Python is the default choice for good reason: it's perfect for simple interactive apps:

@ggorlen
ggorlen / better-git-stats.py
Created May 16, 2026 14:07
better git stats
#!/usr/bin/env python3
# Git stats are misleading because some people squash merge and some people
# create merge commits, bringing their history of commits from the branch onto
# master and making it look like they did way more work relative to squashers.
#
# This tries to treat merge commits as if they were squash merged so repo stats
# are actually normalized/comparable. It also merges by identical name and email.
#
# I'm sure this isn't 100% accurate, particularly for LOC, but anecdotally seems
@ggorlen
ggorlen / automating-life.md
Last active June 8, 2026 06:52
automating life

Automating Life

What have we done with technology?

  • cars: privatized/corporatized/automated walking, biking, public transit, horses
    • outcome: walkable urban centers and close-knit towns become exurbs and strip malls, ubiquitous noise, pollution and car infra, all humans required to fork over hundreds of thousands of dollars per life just to get around the way they used to be able to do for free, super long commutes, obsesity, 40k deaths per year in the US, environmental damage, lead poisoning, now cars are massively reliant on computer chips and can't be repaired easily, etc. Enabler of classical big box store style consumption.
  • smart phones: the control center that runs everything else and enables most other automation, replaces wallets, credit cards, traditional phones, video cameras, photo cameras, alarm clocks, music players, transit cards, watches, books, TVs, calculators, and most other single-purpose consumer goods of the 20th century
  • outcome: impossible to survive without technological k
@ggorlen
ggorlen / slack-post-from-cli.md
Created May 12, 2026 23:22
Siphon tokens from Chrome with AppleScript

Post to Slack as yourself from the CLI (macOS + Chrome)

Slack's xoxc- session tokens require an HttpOnly d cookie that JavaScript can't read. But you don't need to extract it. By running fetch() inside Chrome's Slack tab via AppleScript, the browser attaches the cookie automatically.

No bots, no webhooks, no OAuth apps. Just your existing Slack session.

Requirements

  • macOS (uses osascript)
  • Chrome with a app.slack.com tab open
@ggorlen
ggorlen / example-software-design-document.md
Last active June 20, 2026 18:41
example software design document

Example Software Design Document

Purpose

The app will be a full-stack, multi-user wiki application, basically a simplified Wikipedia.

Technologies

  • Front end: React with React Router and the marked library for rendering markdown
  • Back end: