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
| 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
| 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
| 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
| 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
| <: &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
| #!/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
| #!/bin/bash | |
| defaults write -g InitialKeyRepeat -int 15 # normal minimum is 15 (225 ms) | |
| defaults write -g KeyRepeat -int 2 # normal minimum is 2 (30 ms) |
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
| print "<pre>"; | |
| print_r(array_map(function($v){ | |
| return array_filter($v,function($v){ | |
| return in_array($v,["title","created_at","updated_at","source_branch","web_url"]); | |
| },ARRAY_FILTER_USE_KEY); | |
| },$mergeRequests)); | |
| die(); |
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
| EDITOR=true git rebase --autosquash --autostash -i origin/master |