Metric server install:
https://github.com/kubernetes-sigs/metrics-server
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml| <ItemGroup> | |
| <Protobuf Include="..\Protos\greet.proto" GrpcServices="Server" Link="Protos\greet.proto" /> | |
| </ItemGroup> |
| mkdir -p /home/ubuntu/couchdb/data | |
| docker run -d \ | |
| --restart unless-stopped \ | |
| -v /home/ubuntu/couchdb/data:/opt/couchdb/data \ | |
| -e COUCHDB_USER=admin \ | |
| -e COUCHDB_PASSWORD=strongPassword \ | |
| -p 5984:5984 \ | |
| --name couchdb \ | |
| couchdb:latest |
| docker run -d \ | |
| -e POSTGRES_PASSWORD=SuperSecret \ | |
| -v ~/postgresql/13/data:/var/lib/postgresql/data \ # windows: -v d:/postgresql/13/data:/var/lib/postgresql/data | |
| -p 5432:5432 \ | |
| --name postgres \ | |
| postgres:13 | |
| docker run -p 5050:80 -d \ | |
| -e '[email protected]' \ | |
| -e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \ |
| #!/bin/bash | |
| # Substitute variables here | |
| ORG_NAME="<ORG_NAME>" | |
| GITHUB_INSTANCE="<GITHUB_INSTANCE>" | |
| URL="https://${GITHUB_INSTANCE}/api/v3/orgs/${ORG_NAME}/repos" | |
| curl ${URL} | ruby -rjson -e 'JSON.load(STDIN.read).each {|repo| %x[git clone #{repo["clone_url"]} ]}' |
Metric server install:
https://github.com/kubernetes-sigs/metrics-server
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml| # https://www.baeldung.com/linux/use-command-line-arguments-in-bash-script | |
| # usage: <script> -u <username> -a <age> -f <fullname> | |
| while getopts u:a:f: flag | |
| do | |
| case "${flag}" in | |
| u) username=${OPTARG};; | |
| a) age=${OPTARG};; | |
| f) fullname=${OPTARG};; | |
| esac | |
| done |
| ingress: | |
| enabled: true | |
| className: "" | |
| annotations: | |
| kubernetes.io/ingress.class: nginx | |
| nginx.ingress.kubernetes.io/rewrite-target: /$1 | |
| hosts: | |
| - host: kubernetes.docker.internal | |
| paths: | |
| - path: /my-app-path/?(.*) |
Install posh-git, oh-my-posh and CaskaydiaCode Nerd Font
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUserVisit https://www.nerdfonts.com/ and find CaskaydiaCove Nerd Font. The font contains glyphs/icons required by the themes.
| switch_back_to_branch() { | |
| # get the current branch name | |
| current_branch=$(git rev-parse --abbrev-ref HEAD) | |
| # pull target branch | |
| git fetch origin $1:$1 | |
| # switch to target branch | |
| git checkout $1 | |
| # if -d is passed as second argument, delete the current branch | |
| if [ "$2" = "-d" ]; then | |
| # delete old branch and suppress error if branch is not merged |
| ask_gpt() { | |
| # print the prompt in blue | |
| echo -e "\e[34mPrompt: \"$1\"\e[0m" | |
| # make a a slient request and store the result | |
| response=$(curl https://api.openai.com/v1/completions \ | |
| --silent \ | |
| -H "Content-Type: application/json" \ | |
| -H "Authorization: Bearer {TOKEN}" \ | |
| -d '{ | |
| "model": "text-davinci-003", |