This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl \ | |
--include \ | |
-H 'Accept: application/vnd.google.protobuf; proto=io.prometheus.client.MetricFamily; encoding=compact-text' \ | |
$@ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
_ "unsafe" | |
_ "github.com/prometheus/prometheus/model/textparse" | |
dto "github.com/prometheus/prometheus/prompb/io/prometheus/client" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tools: | |
entgo.io/ent/cmd/ent: | |
github.com/766b/godox: | |
github.com/akavel/up: | |
github.com/caddyserver/caddy/v2/cmd/caddy: | |
github.com/cli/cli: | |
clone: true | |
build: | |
- make bin/gh | |
- cp bin/gh ${OUTDIR} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"fmt" | |
"regexp" | |
"strings" | |
"testing" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
autonumber | |
hide footbox | |
participant "wrapper\n(stage 2)" as wrapper | |
participant "stage 1" as stage_1 | |
participant master | |
participant "rpc server" as rpc_server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@startuml | |
autonumber | |
hide footbox | |
participant "wrapper\n(stage 2)" as wrapper | |
participant "stage 1" as stage_1 | |
participant master | |
participant "rpc server" as rpc_server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am mem on github. | |
* I am mem (https://keybase.io/mem) on keybase. | |
* I have a public key ASC7tQYyimGItv9HXARDm-zuEZx7HZwV_Px4hRcsZbOxkgo | |
To claim this, I am signing this object: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
get_inode() { | |
stat -c '%i' "$1" | |
} | |
find_go() { | |
self=`get_inode $(readlink -m "$1")` | |
local IFS=: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- http://sylnsr.blogspot.com/2015/08/generate-golang-struct-model-from.html | |
WITH models AS ( | |
WITH data AS ( | |
SELECT | |
replace(initcap(table_name::text), '_', '') table_name, | |
replace(initcap(column_name::text), '_', '') column_name, | |
CASE data_type | |
WHEN 'timestamp without time zone' THEN 'time.Time' | |
WHEN 'timestamp with time zone' THEN 'time.Time' | |
WHEN 'boolean' THEN 'bool' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Given a package's import path, this script will list the Go sources (not in $GOROOT) | |
# used to build that pacakge. | |
go list -f '{{ join .Deps "\n" }}' "$@" | | |
xargs -r -d '\n' \ | |
go list -f '{{ if not .Goroot }}{{ .ImportPath }}{{ end }}' 2> /dev/null | | |
xargs -r -d '\n' \ | |
go list \ |
NewerOlder