This file contains 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
#!/usr/bin/env sh | |
URLS[0]="https://www.google.com" | |
URLS[1]="http://169.254.169.254/metadata/instance?api-version=2020-06-01" # azure internal endpoint | |
HEADERS[O]="" | |
HEADERS[1]="-H 'Metadata: true'" | |
OUTPUT=${OUTPUT:-/tmp/curl.prom} | |
SLEEP=${SLEEP:-10} |
This file contains 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 ( | |
_ "unsafe" | |
"fmt" | |
) | |
var slice = []byte("AAA") | |
func main() { |
This file contains 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 | |
// Original code found at: https://play.golang.org/p/kWmjEuXn0ab | |
import ( | |
"fmt" | |
"sync" | |
"time" | |
) |
This file contains 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
✘ s.rabot@wmbpro-srabot ~/go/src/github.com/prometheus/alertmanager master make 09:12:40 | |
>> checking code style | |
>> checking license header | |
>> running golangci-lint | |
GO111MODULE=on go list -e -compiled -test=true -export=false -deps=true -find=false -tags= -- ./... > /dev/null | |
go: finding github.com/prometheus/client_golang v1.2.1 | |
GO111MODULE=on /Users/s.rabot/go/bin/golangci-lint run ./... | |
>> running check for unused/missing packages in go.mod | |
GO111MODULE=on go mod tidy | |
>> running check for unused packages in vendor/ |
This file contains 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
kind: HorizontalPodAutoscaler | |
apiVersion: autoscaling/v2beta1 | |
metadata: | |
name: {{ HPA }} | |
spec: | |
scaleTargetRef: | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
name: {{ DEPLOYMENT }} | |
minReplicas: 2 |
This file contains 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" | |
) | |
type Wheel struct { | |
// Diameter Wheel diameter in centimeters | |
Diameter int64 | |
} |
This file contains 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
goroutine 1516690 [running]: | |
runtime/pprof.writeGoroutineStacks(0x7fcfd86e2b90, 0xc09997ee60, 0x40bb2f, 0xc0d9689c50) | |
/usr/local/go/src/runtime/pprof/pprof.go:678 +0xa7 | |
runtime/pprof.writeGoroutine(0x7fcfd86e2b90, 0xc09997ee60, 0x2, 0xc00033e700, 0x0) | |
/usr/local/go/src/runtime/pprof/pprof.go:667 +0x44 | |
runtime/pprof.(*Profile).WriteTo(0x2e6eb80, 0x7fcfd86e2b90, 0xc09997ee60, 0x2, 0xc09997ee60, 0xc041252e80) | |
/usr/local/go/src/runtime/pprof/pprof.go:328 +0x3e4 | |
net/http/pprof.handler.ServeHTTP(0xc07fd206cd, 0x9, 0x7fcfd86e2b60, 0xc09997ee60, 0xc0b4f3aa00) | |
/usr/local/go/src/net/http/pprof/pprof.go:245 +0x210 | |
net/http/pprof.Index(0x7fcfd86e2b60, 0xc09997ee60, 0xc0b4f3aa00) |
This file contains 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
// Copyright 2015 The Prometheus Authors | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, | |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
This file contains 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
{ | |
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"parameters": { | |
"vmDnsName": { | |
"type": "string", | |
"metadata": { | |
"description": "DNS name for the VM" | |
} | |
}, |
This file contains 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" | |
"sync" | |
"time" | |
"strconv" | |
"math/rand" | |
"crypto/md5" | |
"encoding/hex" |