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
| #!/bin/bash | |
| iptables -t filter -A FORWARD -o vmbr2 -j ACCEPT | |
| iptables -t filter -A FORWARD -i vmbr2 -j ACCEPT | |
| echo 1 > /proc/sys/net/ipv4/ip_forward | |
| iptables -t nat -A POSTROUTING -o vmbr2 -j MASQUERADE | |
| iptables -t nat -A PREROUTING -p tcp -d external.public.ip --dport 5000 -i vmbr0 -j DNAT --to-destination 10.8.1.2:5000 |
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
| <: &backend-forward | |
| name: backend-http | |
| type: kubernetes-remote | |
| values: | |
| context: dev-microk8s | |
| namespace: default | |
| labels: | |
| app: v1-app-webserver # pod deployment | |
| hostname: backend-http | |
| ports: |
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
| kubectl get pods -o json | jq -r '.items[].status.containerStatuses[].state.running.startedAt | fromdate | tostring + ""' | sort -r | head -n 1 | xargs date -r |
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
| networksetup -setdnsservers Wi-Fi \ | |
| 8.8.8.8 \ | |
| 8.8.4.4 \ | |
| $(kubectl get svc --namespace kube-system kube-dns -o json | jq -r ".spec.clusterIP") |
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
| kubecl get secret kaniko-secret -o json | jq -r '.data."config.json"' | base64 -D | jq -r '.auths."registry.gitlab.com".auth'| base64 -D |
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
| default: help | |
| help: | |
| @echo "Usage:" | |
| @echo " make [command]" | |
| @echo | |
| @echo "Available commands:" | |
| @grep -v '^_' Makefile | grep '^[^#[:space:]].*:' | grep -v '^default' | sed 's/:\(.*\)//' | xargs -n 1 echo ' -' | |
| @echo |
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
| <?php | |
| class Command { | |
| public $param1; | |
| public $param2; | |
| public $param3=2; | |
| public function getParam3(){ | |
| return $this->param3; | |
| } | |
| } |
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 ( | |
| "bytes" | |
| "encoding/json" | |
| "fmt" | |
| "html/template" | |
| "io/ioutil" | |
| "log" | |
| "os/exec" |
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
| ENTRYPOINT ["/bin/sh"] | |
| CMD ["-c","while true; do sleep 2; date; done"] | |
| # --entrypoint "/bin/bash" imagename:latest -c "while true; do sleep 2; date; done" |
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
| sudo apt-get install apt-transport-https lsb-release ca-certificates | |
| sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg | |
| echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list | |
| sudo apt-get update | |
| sudo apt-get install -y php7.2-cli php7.2-curl php7.2-dom php7.2-zip php7.2-mbstring php7.2-xml php7.2-gd php7.2-simplexml php7.2-intl php7.2-opcache php7.2-zip | |
| sudo wget http://getcomposer.org/composer.phar -O /usr/local/bin/composer | |
| sudo chmod a+x /usr/local/bin/composer |