Skip to content

Instantly share code, notes, and snippets.

View dgilbert-foreflight's full-sized avatar

Danny Gilbert dgilbert-foreflight

View GitHub Profile
@dgilbert-foreflight
dgilbert-foreflight / check-merged-prs.sh
Created October 22, 2025 16:13
Validate Merge Queue Operations
#!/usr/bin/env -S usage zsh
# Usage: ./check-merged-prs.sh [repo_name] [base_branch] [number_of_prs] [output_dir]
#USAGE arg "<repo>" help="The name of the repository to check (nameWithOwner - <owner>/<repo>)"
#USAGE arg "<limit>" help="The number of PRs to check (default: 100)" default="100"
#USAGE flag "--base <base>" help="The base branch to check (default: develop)" default="develop"
#USAGE flag "--output <output_dir>" help="The directory to save the output"
setopt ERR_EXIT
setopt NO_UNSET

Asset Generator

This is a Swift-based command-line tool designed to generate and manage assets for Xcode projects. It allows you to overlay images onto your app icons and generate the compiled Assets.car file for said icon.

Features

  • Overlay images on top of app icons.
  • Download overlay images from a URL.
  • Specify output directory for generated assets.
@dgilbert-foreflight
dgilbert-foreflight / swiftpm_netrc.zsh
Last active November 6, 2025 15:46
Regenerate ~/.netrc with help of gh cli tool
cat > ~/.netrc <<EOF
machine api.github.com
login $(gh auth status | sed -n 's/.*Logged in to github\.com account \([^ ]*_jepp\) .*/\1/p')
password $(gh auth token)
EOF
@dgilbert-foreflight
dgilbert-foreflight / .swiftformat
Last active January 7, 2025 15:40
swiftformat rules
# Swift Format Rules
# https://github.com/nicklockwood/SwiftFormat/blob/main/Rules.md
--swiftversion 6.0
--minversion 0.55.4
# File Header
--header "{file}\nOriginal Author: {author.name} <{author.email}>\n{created}"
# Editor Settings
@dgilbert-foreflight
dgilbert-foreflight / ZSH_TEMPLATE.md
Last active April 16, 2025 14:57
zsh Script Template

ZSH Script Template

This provides a template for creating zsh scripts.

Helpers.zsh

This is where shared definitions / functions are stored.

@dgilbert-foreflight
dgilbert-foreflight / README.md
Last active November 6, 2025 16:01
GitHub / SPM Onboarding

Onboarding

Script for onboarding new development machines.

  • Installs Rosetta (M1)
  • Installs Homebrew
  • Installs GitHub CLI
  • Initializes Git LFS
  • Sets up Git Credential Helper
  • Sets up .netrc file (api.github.com)

Usage