Skip to content

Instantly share code, notes, and snippets.

View mcandre's full-sized avatar

Andrew mcandre

View GitHub Profile
@mcandre
mcandre / vscode-prettify-code.md
Last active January 19, 2026 04:02
VSCode: Prettify code

VSCode: Prettify Code

  1. Install an appropriate syntax plugin with prettifying capability (category:formatters <language>).
  2. Select the desired editor tab.
  3. Press Alt + Shift + F.
@mcandre
mcandre / docker-fix-missing-local-images.md
Created January 2, 2026 20:37
Docker Fix Missing Local Images

Docker Fix Missing Local Images

buildx

Docker's buildx subsystem may not automatically load built images into the normal Docker cache, depending on the Docker configuration.

  1. Select a supported Docker platform for your host environment (e.g. linux/arm64, linux/amd64, etc).
  2. Run docker buildx build [--builder <builder>] --platform <platform>.

Plain Vanilla Docker

@mcandre
mcandre / accelerate-zsh.md
Created November 28, 2025 06:58
Accelerate zsh

Accelerate zsh

  1. Temporarily enclose your ~/.zshrc file with benchmark instructions:
zmodload zsh/zprof
...
zprof
@mcandre
mcandre / .tool-versions
Last active November 20, 2025 16:54
ComfyUI Background Service
# asdf
# https://asdf-vm.com/
#
# ~/nfsshare/.tool-versions
python 3.14.0
@mcandre
mcandre / rune-preservation-in-pagers.md
Last active October 29, 2025 21:42
Rune Preservation in Pagers

Rune Preservation in Pagers

Most pager applications, including more, less, ov, and eless, corrupt hard tabs to spaces. Consequently, they may break common copy & paste workflows for Go, make, and other indentation sensitive languages.

Alternatives to Consider

Some alternatives exist.

Configure an environment variable PAGER=<command> with the desired pager command. Many applications, such as git, invoke pagers this way.

@mcandre
mcandre / fix-brave-mailto-uri-registration.md
Created October 21, 2025 18:22
Fix Brave mailto: URI Registration

Fix Brave mailto: URI Registration

When registering URI handlers, Brave's configuration system often corrupts. Various hyperlinks may misbehave.

To fix this horrid computer state, pop open the hood and ensure that the pipes are fully connected to the right parts:

  1. Navigate to brave://settings/handlers.
  2. Set the desired platforms as the default handlers, such as Proton Mail for email mailto URI's.
@mcandre
mcandre / vscode-disable-ai.md
Created August 22, 2025 16:33
VSCode Disable AI

VSCode Disable AI

macOS

Command + Shift + P, Chat: Hide AI Features, Return

Windows, UNIX

Control + Shift + P, Chat: Hide AI Features, Enter

@mcandre
mcandre / ios-disable-split-screen.md
Created August 10, 2025 00:43
iOS Disable Split Screen

iOS Disable Split Screen

Navigate to Settings -> Accessibility -> Touch and set Reachability to off. Now your iPhone will stop randomly yanking the entire screen halfway down the device when using various gestures in the vicinity of the bottom of the screen.

@mcandre
mcandre / ffmpeg-merge-streams.md
Last active July 11, 2025 22:00
ffmpeg merge streams

ffmpeg merge streams

  1. Write an ffmpeg input configuration file list.txt of the form:
file '<input-1>'
file '<input-2>'
file '<input-3>'
...
@mcandre
mcandre / macos-toggle-keyboard-function-keys.md
Created June 25, 2025 20:49
macOS Toggle Keyboard Function Keys

macOS Toggle Keyboard Function Keys

Apple does not make it easy to very rapidly toggle between the two F1 - F12 vs. Brightness - Volume Up keyboard modes.

Fortunately, this can be automated via the Shortcuts scripting system.

Run Shell Script

defaults write -g com.apple.keyboard.fnState -int $(( ! "$(defaults read -g com.apple.keyboard.fnState -int)" ))