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 / 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)"'
@Integralist
Integralist / 4-backticks.md
Created November 10, 2025 18:05
Markdown code block that contains a code block

Use 4 backticks to create a markdown code block that itself contains a code block...

# Some title

This is my __markdown__ file.

## Code Example

Here is a code example:
@Integralist
Integralist / Interface Boxing.md
Created October 24, 2025 17:25
Go: Interface Boxing #perf

In Go, when you convert a concrete value (like a number or a struct) into an interface type, it's called interface boxing. This can sometimes cause performance problems because it can lead to hidden memory allocations on the heap, extra copying of data, and more work for the garbage collector. This is especially true for performance-critical code.

How it Works

An interface in Go is made up of two parts: a type descriptor and a data pointer. When you assign a value that isn't a pointer to an interface, Go might have to make a copy of that value on the heap. This can be slow and use a lot of memory, especially if you're working with large data structures.

The Problem