Skip to content

Instantly share code, notes, and snippets.

View marco-m's full-sized avatar
🥕

Marco Molteni marco-m

🥕
View GitHub Profile
@marco-m
marco-m / printf.go
Created July 16, 2022 12:48
Custom printing of Go structs with Stringer interface
package main
import (
"fmt"
"github.com/hashicorp/go-hclog"
)
type Cage struct {
Bo Bottle
@marco-m
marco-m / color-msg.sh
Created April 14, 2020 09:38
nice simple way to use colors in shell scripts
#! /bin/bash
# Courtesy of https://github.com/thought-machine/please/blob/master/bootstrap.sh
# See for example http://man7.org/linux/man-pages/man4/console_codes.4.html
# for more ANSI colors
function notice {
>&2 echo -e "\033[32m$1\033[0m"
}
function warn {