Skip to content

Instantly share code, notes, and snippets.

View alex-quiterio's full-sized avatar
🌀

aIex quiterio alex-quiterio

🌀
  • Seenons
  • Amsterdam
  • 15:02 (UTC +01:00)
View GitHub Profile
@alex-quiterio
alex-quiterio / bootstrap-mac.sh
Last active November 7, 2026 20:16
bootstrap-mac.sh: set up a new Mac from scratch
#!/usr/bin/env bash
#
# bootstrap-mac.sh
# Set up a new Mac from scratch.
#
# Installs Homebrew and the apps, logs in to GitHub, sets up fish, pulls my
# scripts and fish functions from my gists, clones my repositories and
# configures Claude Code. Made for Apple Silicon Macs.
#
# Safe to re-run: anything already in place is skipped.
function cleanup-storage --description 'Free disk space from developer caches (pass --dry-run to preview)'
set --local scripts_local_folder "$HOME/.scripts"
command "$scripts_local_folder/cleanup-storage.sh" $argv
end
#!/usr/bin/env ruby
# frozen_string_literal: true
# =============================================================================
# draw.rb — shuffle a 78-card Rider–Waite–Smith deck and lay out a spread.
#
# The reading is only honest if the draw is not chosen by the reader, so the
# cards come from here and never from the model's head. Every draw prints its
# seed: the same seed and spread give the same cards, which is what lets a
# reading in the journal be checked later.
#!/usr/bin/env bash
# Print a summary of this Mac's hardware, OS and disk.
set -euo pipefail
bytes_to_gb() { echo "$(( $1 / 1024 / 1024 / 1024 )) GB"; }
row() { printf ' %-14s %s\n' "$1" "$2"; }
echo
echo "Hardware"
#!/usr/bin/env ruby
# frozen_string_literal: true
# =============================================================================
# human_design.rb — compute a Human Design chart (Type, Authority, Profile,
# defined Centers, active gates/channels) from birth data.
#
# Human Design is derived from TWO charts:
# 1. Personality (conscious): the exact moment of birth.
# 2. Design (unconscious): the moment the Sun was exactly 88 degrees of arc
function human-design --description 'Human design report'
set --local SCRIPTS_LOCAL_FOLDER "$HOME/.scripts"
ruby "$SCRIPTS_LOCAL_FOLDER/human_design.rb" $argv --with-num
end
function install-script --description 'Install a remote script in your local .scripts folder'
set --local SCRIPTS_LOCAL_FOLDER "$HOME/.scripts"
# Fail if argv is empty
if test -z "$argv"
echo "Usage: install-script <gist-id>"
return 1
end
ruby "$SCRIPTS_LOCAL_FOLDER/install-gist.rb" $argv[1] $SCRIPTS_LOCAL_FOLDER
end
function install-function --description 'Install a remote function in your local fish functions folder'
set --local SCRIPTS_LOCAL_FOLDER "$HOME/.scripts"
set --local FISH_FUNCTIONS "$HOME/.config/fish/functions"
# Fail if argv is empty
if test -z "$argv"
echo "Usage: install-function <gist-id>"
return 1
end
ruby "$SCRIPTS_LOCAL_FOLDER/install-gist.rb" $argv[1] $FISH_FUNCTIONS
#!/usr/bin/env ruby
# install_gist.rb — installs a gist by ID into a directory
#
# Fetches the gist, downloads its file(s), and registers them in .gist-ids
#
# Setup:
# 1. Install gh CLI: https://cli.github.com
# 2. Run: gh auth login
#
# Usage:
#!/usr/bin/env ruby
# update_gists.rb — updates all gists in a directory
#
# Setup:
# 1. Install gh CLI: https://cli.github.com
# 2. Run: gh auth login
# 3. Create a .gist-ids file in your gist directory:
# my_script.rb=abc123def456
# notes.md=xyz789ghi012
#