Skip to content

Instantly share code, notes, and snippets.

View chadfennell's full-sized avatar

Chad M Fennell chadfennell

View GitHub Profile
@chadfennell
chadfennell / awesome_python.md
Created August 26, 2025 16:56
Awesome (looking) Python Libraries

Result (monad)

https://pypi.org/project/result/

from result import Ok, Err, Result, is_ok, is_err

def get_user_by_email(email: str) -> Result[User, str]:
    """
    Return the user instance or an error message.
@chadfennell
chadfennell / gist:b875dfb4046c7908dfdde8a22690db8d
Last active November 3, 2025 20:06
fly-secrets-hydrate.sh
#!/usr/bin/env bash
set -euo pipefail
# Sync secrets from 1Password to Fly.io
# Usage: ./fly-secrets-hydrate.sh <prod|stage>
# Pre-requisites:
# flyctl https://fly.io/docs/flyctl/install/
# 1Password op https://developer.1password.com/docs/cli/get-started/
@chadfennell
chadfennell / hydrate-local.sh
Created February 3, 2026 13:56
1Password Hydration
#!/bin/sh
## 1Password CLI: https://developer.1password.com/docs/cli/
## per-env vaults e.g.
# my-proj-local
# my-proj-stage
# my-proj-prod
export OP_ACCOUNT="a-company-name-here.1password.com"
$(op signin);
# Basic settings
set -g base-index 1
setw -g pane-base-index 1
set -g default-shell /usr/bin/zsh
set -g history-limit 2000
set -g mouse off
set -g status on
# Status bar colors
set -g status-style bg=green,fg=black
@chadfennell
chadfennell / SKILL.md
Created March 27, 2026 23:46
Claude Skill: John Ousterhout's Module Design Ideas
name module-design
description Use when creating new modules, splitting responsibilities, designing APIs, or deciding what to expose publicly — guides deep module design and information hiding

Module Design

Based on John Ousterhout's "A Philosophy of Software Design."

Core Principle