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 | |
| _term() { | |
| echo "Caught SIGTERM signal, wait for 30s before forwarding it to gunicorn" | |
| sleep 30 | |
| kill -TERM "$pid" 2>/dev/null | |
| } | |
| trap _term SIGTERM |
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
| # show pages installed since ROM | |
| opkg list_installed | sort > /tmp/installed_now | |
| opkg list_installed -o /rom | sort > /tmp/installed_rom | |
| grep -Fxv -f /tmp/installed_rom /tmp/installed_now | tee /tmp/installed_diff | |
| # echo installable list of packages | |
| cat /tmp/installed_diff | cut -f 1 -d ' ' | xargs |
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 cs 1 ↵ | |
| NAME STATUS MESSAGE ERROR | |
| controller-manager Unhealthy Get http://127.0.0.1:10252/healthz: dial tcp 127.0.0.1:10252: getsockopt: connection refused | |
| scheduler Unhealthy Get http://127.0.0.1:10251/healthz: dial tcp 127.0.0.1:10251: getsockopt: connection refused | |
| etcd-0 Healthy {"health": "true"} | |
| $ kubectl describe nodes aks-agentpool1-21574822-2 | |
| Name: aks-agentpool1-21574822-2 | |
| Roles: agent | |
| Labels: agentpool=agentpool1 |
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
| # Calico Version v2.6.2 | |
| # https://docs.projectcalico.org/v2.6/releases#v2.6.2 | |
| # This manifest includes the following component versions: | |
| # calico/node:v2.6.2 | |
| # calico/cni:v1.11.0 | |
| # This ConfigMap is used to configure a self-hosted Calico installation. | |
| kind: ConfigMap | |
| apiVersion: v1 | |
| metadata: |
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 run hack1 --restart=Never -t -i -n kube-system --image overridden --overrides '{"spec":{"hostPID": true, "containers":[{"name":"busybox","image":"alpine:3.7","command":["nsenter","--mount=/proc/1/ns/mnt","--","/bin/bash"],"stdin": true,"tty":true,"securityContext":{"privileged":true}}]}}' --rm --attach |
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 "fmt" | |
| import "github.com/spf13/cobra" | |
| import "os" | |
| var works bool | |
| func init() { | |
| rootCmd.PersistentFlags().BoolVar(&works, "works", false, "testing flag behaviour") |
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
| version: '2' | |
| services: | |
| etcd: | |
| image: quay.io/coreos/etcd:v3.1.12 | |
| ports: | |
| - 2379 | |
| volumes: | |
| - etcd_data:/etcd_data | |
| command: | |
| - /usr/local/bin/etcd |
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
| go test -json $(go list ./... | grep -v /vendor/) -coverprofile report_coverage.cov > report_gotest.json | |
| ~/sonar-scanner \ | |
| -Dsonar.sources=./ \ | |
| -Dsonar.sources.inclusions=**/**.go \ | |
| -Dsonar.exclusions="vendor/**" \ | |
| -Dsonar.tests=./ \ | |
| -Dsonar.test.inclusions=**/**_test.go \ | |
| -Dsonar.go.tests.reportPaths="report_gotest.json" \ | |
| -Dsonar.go.coverage.reportPaths="report_coverage.cov" |
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/sh | |
| set +e | |
| set +x | |
| NAMESPACE=restic | |
| BACKUP_FOLDER=/opt/backup/restic | |
| for dir in $(find "${BACKUP_FOLDER}" -type d -maxdepth 1 -mindepth 1); do |
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 | |
| set -o errexit | |
| set -o nounset | |
| set -o pipefail | |
| set -o verbose | |
| REPO_ROOT=$(dirname "${BASH_SOURCE}")/.. | |
| # generate C api |