Skip to content

Instantly share code, notes, and snippets.

View balupton's full-sized avatar
🧙‍♀️
Working on Dorothy, a dotfile ecosystem

Benjamin Lupton balupton

🧙‍♀️
Working on Dorothy, a dotfile ecosystem
View GitHub Profile
@balupton
balupton / talk.md
Last active February 5, 2026 13:10
Dorothy 2023-2026 Updates

Dorothy 2023-2026 Updates

🧙🏻‍♀️ A dotfile ecosystem: cross-shell, cross-os, cross-arch. Make your commands and configurations portable, solve a problem once and for all users. Hundreds of builtin composable primitives for powerful and intuitive CLI and TUI scripting and automation. Portable between Bash, Zsh, Fish, Nu, Xonsh, Elvish, Dash, KornShell, macOS, Linux, Windows https://dorothy.bevry.me

Benjamin Lupton https://balupton.com

Sponsors https://github.com/bevry/dorothy/tree/HEAD?tab=readme-ov-file#sponsors

@balupton
balupton / dhh-example.bash
Last active February 5, 2026 13:03
@dhh's bash argument parsing example <https://x.com/dhh/status/1988152033900122174> now amplified with Dorothy's bash conventions and utilities. Dorothy, a dotfile ecosystem, can be found at <https://dorothy.bevry.me>
#!/usr/bin/env bash
function dhh_example() (
if [[ -n ${DOROTHY-} ]]; then
source "$DOROTHY/sources/bash.bash"
else
eval "$(curl -fsSL 'https://raw.githubusercontent.com/bevry/dorothy/HEAD/sources/bash.bash')"
eval "$(curl -fsSL 'https://raw.githubusercontent.com/bevry/dorothy/HEAD/sources/styles.bash')"
fi
function help {
@balupton
balupton / README.md
Last active January 19, 2026 16:38
Stack Overflow Question 76861137 — How to prevent nested function failures being missed in bash?

Exit Status and Bash

I'm @balupton, author of dorothy which is the largest public bash codebase that I am aware of.

Dorothy is coded using set -e (errexit) to avoid || return $? statements on every single one of its thousands of lines of code, for the most part this has worked well, however I was suprised when the down command would report a failure via:

However it would also report a success within the called function:

@balupton
balupton / android-dev
Last active December 17, 2025 06:45
Dorothy Graveyard
#!/usr/bin/env bash
source "$DOROTHY/sources/strict.bash"
# Android Simulator
app=$(get-app "Android Studio.app")
if test -d "$app"; then
"$app/sdk/tools/emulator" -avd basic
else
echo "Android Studio is not installed"
fi
@balupton
balupton / links.md
Last active July 11, 2025 09:17
Move2Earn, Move2Broke, Move4Free?
@balupton
balupton / apple-bugs.md
Last active June 16, 2025 19:59
Apple Bugs

Apple Bugs

The days of quality apple products and support are long gone, if they ever did exist and weren't just a marketing illusion, and you if you need reliability go elsewhere. Post all the bugs and customer service issues you have run into.

Past and Current Generation Issues:

  • iPhone 16e bluetooth audio stuttering
    • upon return of the devices at 14 days of receipt, apple store employee acted as if he was doing us a favour, as he believes the 2 week return period is from the time the (pre)order is placed, and not when the customer receives the order - this is not the case under australia consumer law, and in any practical sense, especially for pre-orders
  • If you get an AirPods Pro 2 replaced under AppleCare+ they will not transfer the AppleCare+ to the new unit, and instead will require over 5 calls over 5 hours to them days appart to try and resolve
  • App Store Review developer responses will send a notification every few hours, requiring you to disable it
@balupton
balupton / complement.bash
Last active May 26, 2025 14:43
Dorothy: intersect and complement prototypes
# remove the items from <remove-array-var-name> from <array-var-name>:
# __complement <array-var-name> <remove-array-var-name>
# remove the <remove-needle>s from <array-var-name>:
# __complement <array-var-name> -- ..<remove-needle>
# function __complement {
# local array_var_name_left="$1" array_var_name_right n_left n_right i_left v_left i_right found result=()
# shift
# # trunk-ignore(shellcheck/SC1087)
# eval "n_left=\${#$array_var_name_left[@]}"
@balupton
balupton / readme.md
Last active May 3, 2025 04:15
Debugging Ubuntu VPN/Bridge Networking

Networking on my Ubuntu machines is being flaking:

  • docker bridge interface failing
  • traffic not going to vpns
  • when vpn or docker bridge does work it knocks out all dns resolutions

Here are all the things I have tried or yet to try.

docker failures

@balupton
balupton / README.md
Last active April 30, 2025 14:40
Upload a File to Cloudflare R2 Instructions
@balupton
balupton / modern-web-stack.md
Last active April 6, 2025 08:40
🚀 Modern Web Stack, robust scalable employable learnable

Modern Web Stack

Find the list of projects here: https://github.com/stars/balupton/lists/modern-web-stack

All choices are made to set you on the best path from the start, without learning any unnecessary complexity or skills. All technologies are highly internationally employable. Things like Amazon AWS may be more employable, but it is an inferior offering compared to the Cloudflare stack and AWS's domination is only maintained by usage inertia and enterprise promotions. Cloudflare has caching, threat protection, and unlimited scale for everything you could ever want to do, with a superior underlying tech stack.

Code everything in TypeScript, now you have one language for the server and the client, that ensures you have written correct code. If you are coding in PHP, like it is the 00s, then you must learn PHP, HTML, CSS, and JavaScript, in a fragile stack that does not scale. If you are coding in Node.js or Deno, you are coding in a complicated stack that requries so m