Skip to content

Instantly share code, notes, and snippets.

Kai Hendry kaihendry

Block or report user

Report or block kaihendry

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:f18d59416e19830a8263f75f84da85a5
{
"datasource": "-- Grafana --",
"type": "table",
"title": "Panel Title",
"gridPos": {
"x": 0,
"y": 0,
"w": 12,
"h": 8
},
View gist:14ecb57e3a1f14f96cb1516788bc2ac3
GO=go
GOBUILD=${GO} build
GOINSTALL=${GO} install
GOTEST=${GO} test
GOPROXY=https://proxy.golang.org,direct
GOPRIVATE=source.example.com
GOTOOL=${GO} tool
.PHONY: env
env:
View gist:f0d8e29ff8e6409fd5b7bc0f46e21230
GO=go
GOBUILD=${GO} build
GOINSTALL=${GO} install
GOTEST=${GO} test
GOPROXY=https://proxy.golang.org,direct
GOPRIVATE=source.example.com
GOTOOL=${GO} tool
.PHONY: env
env:
View gist:4b4bd0a5c9160175c52c9054aeb9280d
git version 2.7.4
go version go1.13.3 linux/amd64
get "rsc.io/pdf": found meta tag get.metaImport{Prefix:"rsc.io/pdf", VCS:"git", RepoRoot:"https://github.com/rsc/pdf"} at //rsc.io/pdf?go-get=1
get "gopkg.in/errgo.v2": found meta tag get.metaImport{Prefix:"gopkg.in/errgo.v2", VCS:"git", RepoRoot:"https://gopkg.in/errgo.v2"} at //gopkg.in/errgo.v2?go-get=1
get "go.uber.org/atomic": found meta tag get.metaImport{Prefix:"go.uber.org/atomic", VCS:"git", RepoRoot:"https://github.com/uber-go/atomic"} at //go.uber.org/atomic?go-get=1
get "gopkg.in/resty.v1": found meta tag get.metaImport{Prefix:"gopkg.in/resty.v1", VCS:"git", RepoRoot:"https://gopkg.in/resty.v1"} at //gopkg.in/resty.v1?go-get=1
go: github.com/go-redis/redis@v6.15.5+incompatible: reading github.com/go-redis/redis/go.mod at revision v6.15.5: unknown revision v6.15.5
Makefile:22: recipe for target 'test' failed
make: *** [test] Error 1
View gist:d4c90582aec6da1bb648a2bed84bb36d
NAME := hendry/sla
VERSION = $(shell git describe --tags --always --dirty)
BRANCH = $(shell git rev-parse --abbrev-ref HEAD)
DATE = $(shell date +'%FT%T%z')
manifest: options amd64 arm
docker manifest create --amend $(NAME):$(VERSION) $(NAME):amd64 $(NAME):arm
docker manifest annotate $(NAME):$(VERSION) $(NAME):arm --os linux --arch arm
docker manifest inspect $(NAME):$(VERSION)
View gist:1bab070817bc1dfdbc5f2a16bdbdf2c8
#!/bin/bash
for p in {dev,staging,production}
do
echo $p
sum=0
jq ".[] | select(.project == \"${p}\")" networks.json | jq -r .subnet |
while read subnet
do
echo subnet $subnet $sum
num=$(ipcalc "$subnet" | grep Hosts | cut -d " " -f2)
View gist:da83e005cfbf4214cea483a92e5b8691
[hendry@t480s bugzilla]$ git rev-parse HEAD
e88ec7fdc2ea995c669a26af39be0edc46065f8b
[hendry@t480s bugzilla]$ git rev-parse 5.2
6eafd6a807ede6f2ca9e397d1d95fe44404a74c0
[hendry@t480s bugzilla]$ git diff 5.2
[hendry@t480s bugzilla]$ git diff ...5.2
View gist:87d3dd6100290600361c27f1b0e22f89
hendry@knuckles ~ $ ps aux | grep bitcoin
root 736 0.1 0.0 916 612 ? Ss Sep25 5:54 runsvdir -P /run/runit/runsvdir/current log: to lock directory: /var/log/bitcoind: temporary failure svlogd: fatal: no functional log directories. [#] ip link add wg0 type wireguard Error: Unknown device type. Unable to access interface: Protocol not supported [#] ip link delete dev wg0 Cannot find device "wg0" svlogd: warning: unable to lock directory: /var/log/bitcoind: temporary failure svlogd: fatal: no functional log directories.
root 770 0.2 0.0 896 524 ? Ss Sep25 6:50 runsv bitcoind
root 818 0.0 0.0 908 4 ? S Sep25 0:00 svlogd -t /var/log/bitcoind
hendry 22361 0.0 0.0 1716 520 pts/2 S+ 13:45 0:00 grep --exclude-dir=node_modules --color=auto bitcoin
hendry@knuckles ~ $ sudo sv status bitcoind
down: bitcoind: 6784s, normally up; down: log: 0s, normally up, want up
@kaihendry
kaihendry / gist:c75bdd58fa612db94c1fb2af56bcb7bf
Created Sep 24, 2019
items__0::readings::pm25_one_hourly{location: east}
View gist:c75bdd58fa612db94c1fb2af56bcb7bf
# HELP items__0::readings::pm25_one_hourly::central Retrieved value
# TYPE items__0::readings::pm25_one_hourly::central gauge
items__0::readings::pm25_one_hourly::central 23
# HELP items__0::readings::pm25_one_hourly::east Retrieved value
# TYPE items__0::readings::pm25_one_hourly::east gauge
items__0::readings::pm25_one_hourly::east 55
# HELP items__0::readings::pm25_one_hourly::north Retrieved value
# TYPE items__0::readings::pm25_one_hourly::north gauge
items__0::readings::pm25_one_hourly::north 31
# HELP items__0::readings::pm25_one_hourly::south Retrieved value
View gist:3766c7ded1aea932ce4b5f4a7cf50be3
[root@void-live boot]# pwd
/boot
[root@void-live boot]# tree -d
.
├── efi
│   └── EFI
│   └── void_grub
└── grub
├── fonts
└── x86_64-efi
You can’t perform that action at this time.