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 ( | |
"errors" | |
"strconv" | |
"strings" | |
"time" | |
) | |
var ( |
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" | |
"time" | |
) | |
type SessionBasedTicker struct { | |
start time.Time | |
end time.Time |
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
// Inserts new item to a sorted list by still keeping it sorted and keeping the length to at most "max" elements. | |
func CapedSortedInsert[T any](items []T, item T, max int, cmpValue func(a, b T) int) []T { | |
insertionIndex := len(items) | |
for i, val := range items { | |
if cmpValue(item, val) == 1 { | |
insertionIndex = i | |
break | |
} | |
} |
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
version: '3.8' | |
services: | |
jaeger: | |
image: jaegertracing/all-in-one:1.51 # At least 1.35 if you want to have enabled collector | |
container_name: jaeger | |
environment: | |
- COLLECTOR_ZIPKIN_HOST_PORT=:9411 | |
- COLLECTOR_OTLP_ENABLED=true | |
ports: # Some ports are optional or deprecated, but we still let them be here as it's a general snippet | |
- "5775:5775/udp" # agent accept zipkin.thrift over compact thrift protocol (deprecated, used by legacy clients only) |
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
kind: Deployment | |
apiVersion: apps/v1 | |
metadata: | |
name: ldapclient | |
namespace: default | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: ldapclient |
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
autoload -Uz compinit && compinit | |
eval "$(starship init zsh)" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion | |
if [ $commands[oc] ]; then | |
source <(oc completion zsh) | |
compdef _oc oc | |
fi |
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" | |
"time" | |
) | |
const ( | |
msg_welcome string = ` | |
Welcome to Dockeroller! |
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
FROM golang:1.21-alpine3.18 AS builder | |
WORKDIR /app | |
COPY go.mod go.sum ./ | |
RUN go mod download | |
COPY . ./ | |
RUN CGO_ENABLED=0 GOOS=linux go build -a -o main . | |
FROM node:18-alpine3.15 AS frontend | |
WORKDIR /ui | |
COPY ui . |
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" | |
"time" | |
"github.com/golang-jwt/jwt" | |
) | |
func main() { |
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
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "cmd+b", | |
"command": "workbench.action.terminal.clear", | |
"when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" | |
}, | |
{ | |
"key": "cmd+k", | |
"command": "-workbench.action.terminal.clear", |
NewerOlder