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
providers: | |
docker: {} | |
accessLog: {} | |
api: | |
insecure: true |
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
func twoSum(nums []int, target int) []int { | |
for index, number := range nums { | |
if index == len(nums)-1 { | |
break | |
} | |
for secondIndex, secondNum := range nums[index+1:] { | |
if number + secondNum == target { | |
return []int{index, (index+1)+secondIndex} | |
} |
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
--- | |
version: "3.9" | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:6.2.0 | |
hostname: zookeeper | |
container_name: zookeeper | |
ports: | |
- "2181:2181" | |
environment: |
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
... | |
privateKeyBytes, err := ioutil.ReadFile("/path/to/my/private.key") | |
if err != nil { | |
log.Fatalf("failed to read private key file: %v", err) | |
} | |
block, _ := pem.Decode(privateKeyBytes) | |
if err != nil { | |
log.Fatalf("failed to decode private key to PEM: %v", err) | |
} |
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
version: "3.9" | |
services: | |
haproxy: | |
image: haproxy:lts | |
container_name: haproxy | |
user: 1000:1000 | |
ports: | |
- 80:8080 | |
- 443:8443 |
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
build-with-docker: | |
docker run -it --rm \ | |
-v $(shell pwd):/go/src/github.com/vniche/armv6-sample-app \ | |
-w /go/src/github.com/vniche/armv6-sample-app \ | |
--platform linux/arm/v6 \ | |
golang:1.15-buster go build -o sample-app . |
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
# start minikube k8s | |
minikube delete | |
minikube start --kubernetes-version=v1.18.1 --memory=6g \ | |
--bootstrapper=kubeadm --extra-config=kubelet.authentication-token-webhook=true \ | |
--extra-config=kubelet.authorization-mode=Webhook --extra-config=scheduler.address=0.0.0.0 \ | |
--extra-config=controller-manager.address=0.0.0.0 --driver=docker | |
# disable k8s metrics-server as it is going to be served by prometheus | |
minikube addons disable metrics-server |
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
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: observability | |
--- | |
apiVersion: apiextensions.k8s.io/v1beta1 | |
kind: CustomResourceDefinition | |
metadata: |
This file has been truncated, but you can view the full file.
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
--- | |
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: monitoring | |
--- | |
apiVersion: apiextensions.k8s.io/v1 | |
kind: CustomResourceDefinition | |
metadata: |
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 2017-2019 The Jaeger 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 |
NewerOlder