38c3
Related
More from blog
Generic swapping in go When writing tests, overriding global values/defaults1 can become pretty handy for mocking. But as always with global resources, they need to be used carefully2. Otherwise other tests may behave strangely. Therefore a test should make sure those values are reset to its original value regardless of the test result. Here you...
Local-only gitignore Red passenger traffic light in Munich. Taken while doing some street photography with flipez. tl;dr: Enable a local-only untracked gitignore file for all repos using the config option core.excludeFiles. Gitignore is a great way of excluding unwanted files from a git repository. Usually you want to track it within the repo and...
go yolo Green passenger traffic light in Munich. Taken while doing some street photography with flipez. tl;dr Go generics can be used to drop the error of two-return-value functions to enable chaining functions quickly: func Yolo[T any](value T, _ error) T { return value } func main(){ // Atoi has signature func(s string) (int, error) ...
on - run commands on file event On top of the Ulriken near Bergen in Norway from my last rl journey. Inspired from watch, on runs commands repeatedly but on file events likewise to inotifywait. Contents Getting started Origin story Rustlings Watch go lint Random go lint output File events Implementation Fsnotify Debounce events Getting started...
Ferris sweep split keyboard build I built a Ferris Sweep split keyboard originated from the Datenspuren 24 souvenirs. Having a bit soldering experience and hacking curiosity, this was/is a great rabbit hole to explore. Contents Starting point Preparation Components Tools Assembly Close jumper pads on the opposite side Orthogonal pin header...