Skip to content

Instantly share code, notes, and snippets.

View metalmatze's full-sized avatar
🤘

Matthias Loibl metalmatze

🤘
View GitHub Profile
@metalmatze
metalmatze / prometheus.diff
Last active January 16, 2019 16:21
Changing Prometheus in Custom Resource with Prometheus Operator
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
labels:
prometheus: k8s
name: k8s
namespace: monitoring
spec:
alerting:
alertmanagers:
@metalmatze
metalmatze / .gitignore
Last active March 6, 2019 00:10
kube-prometheus-demo
.demo-last-step
@metalmatze
metalmatze / devsummit.md
Last active December 4, 2019 17:00
Prometheus 2019 Dev Summit 2 Summary
@metalmatze
metalmatze / keybase.md
Last active April 11, 2020 13:16
keybase.md

Keybase proof

I hereby claim:

  • I am metalmatze on github.
  • I am metalmatze (https://keybase.io/metalmatze) on keybase.
  • I have a public key ASBSYKeab6u3KX9MtcavrSSuo7MCJR7wOm6wCaCNVokkgAo

To claim this, I am signing this object:

@metalmatze
metalmatze / nginx-ingress-red-dashboard.json
Created April 25, 2020 14:44
NGINX Ingress RED dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@metalmatze
metalmatze / receiver_test.go
Created March 12, 2021 16:38
Benchmarking the Thanos Receiver Handler for a memory leak
// Trying to reproduce https://github.com/thanos-io/thanos/issues/3726
// Add this somewhere (at the end) in the pkg/receive/handler_test.go
// Run go test -bench=BenchmarkHandler ./pkg/receive
func BenchmarkHandler(b *testing.B) {
wreq1 := &prompb.WriteRequest{
Timeseries: []prompb.TimeSeries{
{
Labels: []labelpb.ZLabel{{Name: "foo", Value: "bar"}},
Samples: []prompb.Sample{
@metalmatze
metalmatze / numbericbuilder-value.diff
Created May 22, 2023 15:54
Add `Value(i int)` to `numericbuilder.gen.go.tmpl`
diff --git a/go/arrow/array/dictionary.go b/go/arrow/array/dictionary.go
index 3a46774e5..f796a4f69 100644
--- a/go/arrow/array/numericbuilder.gen.go
+++ b/go/arrow/array/numericbuilder.gen.go
@@ -143,6 +143,10 @@ func (b *Int64Builder) Resize(n int) {
}
}
+func (b *Int64Builder) Value(i int) int64 {
+ return b.rawData[i]