Skip to content

Instantly share code, notes, and snippets.

View mcandre's full-sized avatar

Andrew mcandre

  • Milwaukee, WI
View GitHub Profile
@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
Last active June 18, 2025 03:47
Go Update (Tool) Dependencies

Go Update Tool Dependencies

$ go get -u ./...
$ 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
@mcandre
mcandre / macos-allow-unsigned-applications.md
Last active October 10, 2024 19:01
macOS Allow Unsigned Applications

macOS Allow Unsigned Applications

  1. Run sudo spctl --master-disable.
  2. Launch Settings -> Privacy & Security -> Security -> Allow applications from -> Anywhere.
  3. Confirm the selection prompt.
  4. Contact the application owner's (technical) support and request the application be published through the normal Mac App Store.
@mcandre
mcandre / meta-quest-3-quickly-delete-all-screen-recordings
Created September 9, 2024 17:04
Meta Quest 3 Quickly Delete All Screen Recordings
# Meta Quest 3 Quickly Delete All Screen Recordings
1. Launch the `Files` application.
2. Navigate to `Locations` -> `This headset`.
3. Navigate to `Oculus`.
4. Use the the ellipsis (`...`) menu to delete the `VideoShots` folder.