Skip to content

Instantly share code, notes, and snippets.

View sethwebster's full-sized avatar

Seth Webster sethwebster

View GitHub Profile
# Agent Development Guide
Enterprise-grade guidelines for building production systems with AI agents.
## Core Principles
### 1. Explicit Over Implicit
- Every decision must have a clear rationale
- No magic values or hidden assumptions
- State changes must be traceable
@sethwebster
sethwebster / gist:af3a18440c5640d32de52887cafd9e5a
Created January 30, 2026 20:09
Clean up OpenClaw install
#!/bin/bash
set -euo pipefail
# OpenClaw Uninstaller for macOS and Linux
# Reverses everything done by the OpenClaw installer
# Usage: bash uninstall-openclaw.sh [options]
#
# Security features:
# - Path validation prevents directory traversal attacks
# - Symlink handling avoids deleting unexpected targets
(async () => {
// =========================
// CONFIG
// =========================
const CFG = {
// Collection
sidebarSelector: 'nav[aria-label="Chat history"]',
chatLinkSelector: 'a[href^="/c/"]',
scrollStepRatio: 0.85, // scroll by 85% of viewport height per step
scrollDelayMs: 300,
@sethwebster
sethwebster / README.md
Last active April 12, 2023 19:06
Make Docker Cache Gem Installs to speed up Bundle Install

Gem Install Dockerfile Hack

If you're hacking on your Gemfile and using Docker, you know the pain of having the bundle install command run after you've added or removed a gem. Using docker-compose you could mount a volume and stage your gems there, but this adds additional complexity and doesn't always really solve the problem.

Enter this imperfect solution:

What if we installed every gem into it's own Docker layer which would be happily cached for us?

gem-inject-docker does just that. It takes the list of gems used by your app via bundle list and transforms it into a list of RUN gem install <your gem> -v <gem version> statements and injects them into the Dockerfile at a point of your choosing.

class ThereCanBeOnlyOne {
timeout = null;
performAction(waitMs, action) {
if (this.timeout) this.cancelPrevious();
return new Promise((resolve, reject) => {
this.timeout = setTimeout(() => {
this.cancelPrevious();
const value = action();
if (value.then && value.catch) {
{
"caret_style": "phase",
"color_scheme": "Packages/Colorsublime - Themes/Afterglow.tmTheme",
"fade_fold_buttons": false,
"folder_exclude_patterns":
[
"node_modules",
"bower_components",
".svn",
".git",
addUser() {
echo "Adding user $1..."
adduser $1
gpasswd -a $1 sudo
}
enableSwap() {
echo "Enabling Swap..."
sudo fallocate -l 4G /swapfile
sudo mkswap /swapfile
@sethwebster
sethwebster / GoDaddySSLHAProxy.md
Created December 29, 2015 21:29
Creating a PEM for HaProxy from GoDaddy SSL Certificate

GoDaddy SSL Certificates PEM Creation for HaProxy (Ubuntu 14.04)

1 Acquire your SSL Certificate

Generate your CSR This generates a unique private key, skip this if you already have one.

sudo openssl genrsa -out  etc/ssl/yourdomain.com/yourdomain.com.key 1024

Next generate your CSR (Certificate Signing Request), required by GoDaddy:

### Keybase proof
I hereby claim:
* I am sethwebster on github.
* I am sethwebster (https://keybase.io/sethwebster) on keybase.
* I have a public key whose fingerprint is 1455 B70C 6E9D EACA DF22 1E58 FDE6 0C0B 581B 3A8A
To claim this, I am signing this object:
@sethwebster
sethwebster / update-authors.sh
Last active May 15, 2017 17:26
Script to rewrite a list of authors in git history
#!/bin/bash
#
# +-----------------------+
# | Update Authors Script |
# +-----------------------+-------------------------------------------------------------------------+
# | |
# | Updates wrong authors and maps them to the new Git authors |
# | |