Skip to content

Instantly share code, notes, and snippets.

View Integralist's full-sized avatar
🎯
Making an impact

Mark McDonnell Integralist

🎯
Making an impact
View GitHub Profile
@Integralist
Integralist / HTML ASCII Encoding Reference.md
Created February 19, 2026 15:09
HTML ASCII Encoding Reference
@Integralist
Integralist / redirect.go
Created February 19, 2026 10:39
Go: trie redirects with wildcard support
// First complete match wins.
// Because exact children are tried before `*` which is tried before `**`.
// The most-specific rule wins without an explicit priority sort.
package redirect
import (
"fmt"
"strings"
)
@Integralist
Integralist / README.md
Created February 16, 2026 14:48
Go: ignore vendor directory for multi-language repo

In a multi-language repository—for example, one that includes both Go and Ruby—you can run into conflicts around the vendor/ directory. Ruby commonly uses a vendor/ directory to store dependencies, but Go’s toolchain assumes that a vendor/ directory follows its own vendoring format (including the modules.txt file that defines vendored modules).

If Ruby’s vendor/ directory is present, the Go toolchain may attempt to interpret it as a Go vendoring directory, leading to unexpected errors.

To prevent this, configure Go to use module mode explicitly and ignore the vendor/ directory (which, in this case, is only relevant to Ruby):

  • Add -mod=mod to commands such as go build and go test.
  • Set a global flag with export GOFLAGS=-mod=mod for commands like go tool that do not expose a -mod flag directly.
@Integralist
Integralist / Hyphen vs En Dash vs Em Dash.md
Last active February 3, 2026 12:42
Hyphen vs En Dash vs Em Dash

Hyphen (-)

Connects words, parts of words, or numbers.

En Dash (–)

To indicate ranges or relationships.

Option (⌥) + -

@Integralist
Integralist / convert aifc to m4a.sh
Created January 21, 2026 15:32
Convert aifc to m4a #audio
for f in *.aifc; do
ffmpeg -i "$f" -c:a aac -b:a 192k "${f%.aifc}.m4a"
done
@Integralist
Integralist / How to communicate effectively.md
Created January 20, 2026 16:54
How to communicate effectively

How to communicate effectively...

  • What we're going to do
  • Why we're going to it
  • How we're going to do it
  • How it affects people
@Integralist
Integralist / rip.sh
Created January 18, 2026 18:09
Rip DVD with MakeMKV
# https://www.makemkv.com/
makemkvcon -r info
makemkvcon mkv disc:0 all ./output-dir/
@Integralist
Integralist / README.md
Last active December 9, 2025 10:29
What is Bailiwick? #dns

Here is a simplified explanation of Bailiwick and Glue Records in the context of DNS.

What is "Bailiwick"?

In plain English, a "bailiwick" is someone’s area of authority or jurisdiction.

In DNS, it asks a simple question:

Does the Name Server live inside the domain it is supposed to manage?

@Integralist
Integralist / Remove ASCII escape codes from delta.sh
Created December 1, 2025 18:10
Remove ASCII escape codes from delta
# use perl to strip ASCII escape codes so we can copy delta's diff output
# this is because unlike `git diff` there is no `--no-color` flag.
# and using the classic `diff` is just hard to decipher
delta foo.yaml bar.yaml | perl -pe 's/\x1b\[[0-9;]*[mK]//g' | pbcopy
@Integralist
Integralist / gh-cli-pr-merged-analysis.sh
Last active November 13, 2025 17:36
Merged PRs Analysis #shell #jq #github #cli
gh pr list --repo whatever/example -s merged -L 4666 --search "merged:>2025-05-13" --json author,mergeCommit,number,title,createdAt | jq -r '.[] | select(
(
(.title | startswith("build(deps)")) or
(.title | startswith("bump:")) or
(.title | startswith("build: bump")) or
(.title | startswith("Data update"))
) | not
) | "• \(.title) (\(.number)) -- \(.author.name)"'