Skip to content

Instantly share code, notes, and snippets.

View mcandre's full-sized avatar

Andrew mcandre

  • Milwaukee, WI
View GitHub Profile
@mcandre
mcandre / the-man.md
Created April 24, 2025 23:47
The Man

The Man

When the man comes for your device, activate the corresponding sequence to disable biometrics. Legally, that makes it more cumbersome for them to steal your data.

iOS

  1. Press the power button five times in rapid succession.

macOS

@mcandre
mcandre / trading-card-game-format-archetypes.md
Last active April 20, 2025 05:59
Trading Card Game Format Archetypes

Trading Card Game Format Archetypes

Introduction

Like a deck of Poker playing cards, trading card game's (TCG's) can be enjoyed in multiple ways, by applying different rulesets (formats).

TCG formats come in two main varieties: Constructed and Limited.

Broadly speaking, players bring preassembled decks to Constructed events, whereas in Limited formats they assemble a fresh deck from a pool of cards.

@mcandre
mcandre / macos-startup-items.md
Last active April 21, 2025 02:13
macOS Startup Items

macOS Startup Items

macOS relies too much on applications to manage their own startup item configuration. Over time, this leads to vestigial entries building up in startup items.

Gather data on startup items

Both System Settings and launchctl stink at startup item management.

One of the key features lacking in macOS is GUI + CLI options to query startup items by the very name listed in the Login Items & Extensions pane. This overcomplicates basic cleanup operations, and makes it easier for malware to hide.

@mcandre
mcandre / go-update-tool-dependencies.md
Created April 18, 2025 04:41
Go Update (Tool) Dependencies

Go Update Tool Dependencies

$ go get -u all
$ go mod download; go mod vendor; go mod tidy
@mcandre
mcandre / git-checkout-remote-refs.md
Last active April 28, 2025 01:31
git checkout remote refs

git checkout remote refs

$ git fetch [--all]
$ git checkout -b <branch> --track <remote>/<ref>

Where ref is a commit, tag, or branch.

Thereafter use ordinary git checkout commands to select between local branches.

@mcandre
mcandre / SemExit.md
Last active April 12, 2025 22:29
SemExit

SemExit: Semantic Exit Codes for Command Line Interface Processes

MOTIVATION

Standardize Command Line Interface (CLI) program exit code semantics similar to Web response statuses, towards an ecosystem of more intuitive, scriptable, and CI/CD friendly terminal applications.

INTRODUCTION

Unlike modern REST apps, CLI program behavior has continued to vary in the extreme. Simply checking whether a child process succeeds vs. fails from the parent is often a complicated affair, involving tons of error handling logic specific to that particular child command, and all too often involving flaky stdout/stderr log parsing as well.

@mcandre
mcandre / go-register-tools.md
Last active February 11, 2025 23:27
Go Register Tools

Go Register Tools

Go tools with pinned versions can now be tracked with the go mod system.

$ go get -tool <package>

This adds tool dependency entries in go.mod. Then update the go mod cache:

@mcandre
mcandre / lorcana-deckbuilding.md
Last active December 24, 2024 03:32
Lorcana Deckbuilding

Lorcana Deckbuilding

REQUIREMENTS

  • Minimum 60 cards †
  • Maximum 2 colors
  • Maximum 4 copies of each card that shares the exact title and subtitle name

RECOMMENDATIONS

@mcandre
mcandre / comfyui-safer-ux.md
Created October 28, 2024 18:03
ComfyUI Safer UX

ComfyUI Safer UX

ComfyUI ignores traditional uses of the Ctrl+D hotkey, namely erasing text to the right of the cursor (Emacs, macOS); and favoriting bookmarks (Windows Web browsers). Pressing Ctrl+D in ComfyUI does neither of these things. Instead, ComfyUI instantly, irrecovably erases many settings and applies the default workflow.

For safety, this hotkey can be disabled:

Navigate to Settings -> Keybinding -> Comfy.LoadDefaultWorkflow -> (Trash can delete icon).

@mcandre
mcandre / how-to-locate-commands.md
Last active April 20, 2025 15:09
How to Locate Commands

How to Locate Commands

Feeling lost?

You can verify the location of commands, and distinguish between different types of commands (executable binaries and scripts vs. shell built-in commands vs. aliases) with a variety of analysis commands.

For common UNIX, esp. POSIX compliant shells like ash, bash, dash, ksh, posh, zsh and WLS, try:

  • command -v <name>
  • type