Exec preserving terminal options:
$ docker exec -ti --env COLUMNS=`tput cols` --env LINES=`tput lines` ...
#!/bin/sh | |
#FreeDNS updater script | |
(which wget > /dev/null) || { echo "wget not found"; exit 1; } | |
(which nslookup > /dev/null) || { echo "nslookup not found"; exit 1; } | |
# FREEDNS_APIKEY (loginid|password -> SHA1) | |
DYNLIST=$(wget -qO- http://freedns.afraid.org/api/?action=getdyndns&sha=${FREEDNS_APIKEY}) | |
NAME="$1" |
## Enable --tls substitution for helm tls-enabled commands | |
# | |
helm() { | |
_context=$(kubectl config current-context) | |
if [ -d "${HELM_HOME:-$HOME/.helm}/tls/$_context" ]; then | |
export HELM_TLS_CA_CERT="${HELM_HOME:-$HOME/.helm}/tls/$_context/ca.cert.pem" | |
export HELM_TLS_CERT="${HELM_HOME:-$HOME/.helm}/tls/$_context/cert.pem" | |
export HELM_TLS_KEY="${HELM_HOME:-$HOME/.helm}/tls/$_context/key.pem" | |
export HELM_TLS_ENABLE="true" | |
fi |
apiVersion: ark.heptio.com/v1 | |
kind: Backup | |
metadata: | |
creationTimestamp: 2018-11-08T14:33:07Z | |
generation: 1 | |
name: my-db-test | |
namespace: heptio-ark | |
resourceVersion: "33426" | |
selfLink: /apis/ark.heptio.com/v1/namespaces/heptio-ark/backups/my-db-test | |
uid: 35c1bb4f-e363-11e8-8d80-02ec800e0240 |
^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$
^([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)\.([0-9]|[1-9][0-9]*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$
# Use envFrom to load Secrets and ConfigMaps into environment variables | |
apiVersion: apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: mans-not-hot | |
labels: | |
app: mans-not-hot | |
spec: | |
replicas: 1 |
#!/bin/bash | |
## Hotspot should be created | |
# sonoffDiy 20170618sn | |
# ref: https://www.sigmdel.ca/michel/ha/sonoff/sonoff_mini_en.html | |
# ref: https://github.com/itead/Sonoff_Devices_DIY_Tools/blob/master/other/SONOFF%20DIY%20MODE%20Protocol%20Doc%20v1.4.md | |
download() { | |
# Download latest | |
# Get lite version (must be less 508kb!) |
templates: | |
- | | |
# Service account which can decrypt helm secrets | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: github-actions-deployer | |
namespace: github-actions | |
annotations: | |
iam.gke.io/gcp-service-account: XXXX@YYYY.iam.gserviceaccount.com |