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
#!/usr/bin/env bash | |
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
git fetch --all | |
git pull --all |
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 | |
CLUSTERS=$(gcloud container clusters list \ | |
--format 'value(name)[terminator=" "]') | |
NODE_PORT=32080 | |
gcloud compute health-checks create tcp hello-kubernetes-health-check --port ${NODE_PORT} | |
gcloud compute backend-services create hello-kubernetes-backend-services \ | |
--connection-draining-timeout 3600 \ |
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
--- | |
- hosts: localhost | |
connection: local | |
gather_facts: False | |
tasks: | |
# - include_vars: jsonfile.json | |
# | |
# - debug: | |
# var: ansible_devices | |
# |
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
gcloud compute instance-groups unmanaged create taiwan \ | |
--zone asia-east1-a | |
gcloud compute instance-groups unmanaged add-instances taiwan \ | |
--instances $(kubectl get nodes \ | |
--context taiwan \ | |
--output=jsonpath='{range .items[*]}{.metadata.name},{end}') \ | |
--zone asia-east1-a | |
gcloud compute instance-groups set-named-ports taiwan \ |
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: kube-router-cfg | |
namespace: kube-system | |
labels: | |
tier: node | |
k8s-app: kube-router | |
data: | |
cni-conf.json: | |
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 | grep Evicted | awk '{print $1}' | xargs kubectl delete pod |
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 | |
########################################## | |
# Generate Filter tool: | |
# https://www.wireshark.org/tools/string-cf.html | |
# | |
# GET Filter: | |
# tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x47455420 | |
# POST Filter: | |
# tcp[((tcp[12:1] & 0xf0) >> 2):4] = 0x504f5354 && tcp[((tcp[12:1] & 0xf0) >> 2) + 4:1] = 0x20 |
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
global: | |
scrape_interval: 60s | |
external_labels: | |
monitor: 'example' | |
rule_files: | |
- /etc/prometheus/config/*.rules | |
scrape_configs: |