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" | |
"io" | |
"net" | |
"net/http" | |
"os" | |
"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
sh -c 'sleep 5 && /usr/bin/nvidia-settings -a "[gpu:0]/GPUFanControlState=1" -a "[fan:0]/GPUTargetFanSpeed=25" -a "[fan:1]/GPUTargetFanSpeed=25"' |
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 ( | |
"flag" | |
"fmt" | |
"io" | |
"net" | |
) | |
var port int |
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 ( | |
"errors" | |
"fmt" | |
"github.com/gin-gonic/gin" | |
"github.com/go-redis/redis" | |
"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
#!/bin/bash | |
set -ex | |
if [[ $(whoami) != "root" ]]; then | |
echo "Please run as root" | |
exit | |
fi | |
# Install dep | |
apt update && apt install -y socat ebtables conntrack |
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
.......some config..... | |
alertmanager: | |
## Deploy alertmanager | |
## | |
enabled: true | |
## Service account for Alertmanager to use. | |
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/ | |
## |
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: flagger.app/v1beta1 | |
kind: Canary | |
metadata: | |
name: dog-canary | |
namespace: default | |
spec: | |
targetRef: | |
apiVersion: apps/v1 | |
kind: Deployment | |
name: dog |
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
{ | |
"languageserver": { | |
"golang": { | |
"command": "gopls", | |
"rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"], | |
"filetypes": ["go"] | |
}, | |
"terraform": { | |
"command": "terraform-ls", | |
"args": ["serve"], |
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 util | |
type Result[T any] struct { | |
Error error | |
Value T | |
} | |
type WithRetry[T any] struct { | |
limit uint | |
count uint |
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
{ | |
"languageserver": { | |
"golang": { | |
"command": "gopls", | |
"rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"], | |
"filetypes": ["go"] | |
} | |
}, | |
"tsserver.npm": "/usr/bin/npm", | |
"coc.preferences.formatOnSaveFiletypes": [ |
NewerOlder