I hereby claim:
- I am necrophonic on github.
- I am necrophonic (https://keybase.io/necrophonic) on keybase.
- I have a public key ASAE7M6gxAuEWrq_3Gkh04rdldOIlMBH-Jv303ldr0fTAgo
To claim this, I am signing this object:
## Add the "help" target as the first target in your makefile. Then, any target | |
## that is marked up with a double hash as shown will display as a help message | |
## when you type just "make" or "make help" | |
help: | |
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
my_target: ## This target does a thing | |
echo "hello" |
package main | |
import ( | |
"bufio" | |
"context" | |
"flag" | |
"fmt" | |
"os" | |
"os/signal" | |
"regexp" |
package main | |
type ( | |
// The struct we actually want to unmarshal to | |
MyStruct { | |
name string `yaml:"name"` | |
age int `yaml:"age"` | |
flavour string `yaml:"flavour"` | |
} `yaml:"mystruct"` |
PLATFORMS := darwin/amd64 linux/amd64 | |
package = cmd/${NAME}/main.go | |
binary = build/${NAME} | |
help: | |
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
compile: clean ## Build binaries for all platforms defined in $PLATFORMS | |
ifndef NAME | |
$(error NAME is undefined) |
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func main() { | |
n := "12345" | |
v := 0.0 |
#!/bin/bash | |
set -e | |
usage() { | |
echo "" | |
echo "Usage: env2yml <source.env> <template.yml>" | |
echo "" | |
echo "Required:" | |
echo " - source.env .... file containing env vars to source" |
/* | |
Useful functions for various random things. | |
Collected here as they don't justify full repos / libraries of their own | |
/* | |
// JAVA Analysis | |
// StringSizeInBytes determines the size of a java string in bytes given the number of chars in it. | |
// https://stackoverflow.com/questions/31206851/how-much-memory-does-a-string-use-in-java-8 | |
func StringSizeInBytes(numChars int, isJava8 bool) int { |
I hereby claim:
To claim this, I am signing this object: