Skip to content

Instantly share code, notes, and snippets.

102650_300x300.jpg
105101_300x300.jpg
105819_300x300.jpg
106854_300x300.jpg
108064_300x300.jpg
109025_300x300.jpg
10951_300x300.jpg
109964_300x300.jpg
111227_300x300.jpg
111676_300x300.jpg
@tschaub
tschaub / tools-as-depdendencies.md
Last active September 29, 2024 14:00
Reproducible module builds with tools (commands) as dependencies

Tools as dependencies

This example is a slight tweak on the best-practices example for working with Go modules as development dependencies.

The downside of the existing example is that someone who git clones your module to make a contribution, would not be able to run go generate (without extra work).

$ go generate
painkiller.go:5: running "stringer": exec: "stringer": executable file not found in $PATH
@aheissenberger
aheissenberger / timemachine.sh
Last active February 21, 2025 21:18
Exclude package folder e.g. node_modules from being backuped by MacOS Time Machine
#!/bin/sh
#set -x
EXCLUDEFOLDERNAME=${3:-"node_modules"}
get_realpath ()
{
echo "$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
}
SEARCHPATH="$(get_realpath ${2:-"${HOME}"})"