This file contains 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
# Documented in the zsh manual: http://zsh.sourceforge.net/Guide/zshguide04.html | |
# under sections: "4.1.1: The simple facts" and "4.5.5: Keymaps" | |
# the default keymap for zle is "Emacs" | |
# The emacs keymap bindings for kill-region and copy-region-as-kill are a little off from emacs' defaults | |
# the zsh defaults are: | |
# M-w => kill-region | |
# M-W => copy-region-as-kill (that's M-S-w) |
This file contains 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
tkc exec $(tkc get po -lapp=ratings -ojsonpath={.items..metadata.name}) \ | |
-c istio-proxy \ | |
-- curl -s http://localhost:15000/config_dump | \ | |
jq -r '.configs[-1].dynamic_active_secrets[0].secret.tls_certificate.certificate_chain.inline_bytes' | \ | |
base64 -d | sed -n '/-----BEGIN /,/-----END/p; /----END/q'|openssl x509 -nocert -ext "subjectAltName" |
This file contains 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
# Check etcd Members on all Nodes | |
docker exec etcd etcdctl member list | |
# Check Endpoint Status | |
docker exec -e ETCDCTL_ENDPOINTS=$(docker exec etcd /bin/sh -c "etcdctl member list | cut -d, -f5 | sed -e 's/ //g' | paste -sd ','") etcd etcdctl endpoint status --write-out table | |
# Check Endpoint Health | |
docker exec -e ETCDCTL_ENDPOINTS=$(docker exec etcd /bin/sh -c "etcdctl member list | cut -d, -f5 | sed -e 's/ //g' | paste -sd ','") etcd etcdctl endpoint health | |
# Check Connectivity on Port TCP/2379 |
This file contains 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 | |
UNAME=${UNAME:-ess} | |
GROUP=${GROUP:-ess} | |
HOST=${HOST:-"10.78.112.194"} | |
HOSTNAME="myrancher.com" | |
HELM_INSTALL_DIR=$(pwd) |
This file contains 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 | |
# This script is inspired by Istio installation script | |
# | |
# The script fetches the latest RKE release | |
# It's derived from ../downloadRKE.sh which is for stable releases but lets | |
# users do curl -L https://git.io/getLatestRKE | ISTIO_VERSION=1.1.1 sh - | |
# for instance to change the version fetched. | |
# This is the latest release candidate (matches ../istio.VERSION after basic |
This file contains 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
var express = require('express') | |
var crypto = require('crypto') | |
var app = express() | |
var hmac = function (key, content) { | |
var method = crypto.createHmac('sha1', key) | |
method.setEncoding('base64') | |
method.write(content) | |
method.end() | |
return method.read() |
This file contains 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
var webWs = new WebSocket("ws://192.168.147.157:8443/ws"); | |
webWs.onopen = () => { | |
webWs.send(JSON.stringify({ | |
cmd:"register", | |
clientid:"web", | |
roomid:"adminroom" | |
}) | |
); | |
}; |
This file contains 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
curl \ | |
--progress-bar \ | |
--location \ | |
'https://github.com/kubernetes/kubernetes/releases/download/v1.7.3/kubernetes.tar.gz' \ | |
| tar -zxvf - | |
export KUBERNETES_RELEASE_URL=https://storage-googleapis.proxy.ustclug.org/kubernetes-release/release; \ | |
bash kubernetes/cluster/get-kube-binaries.sh |
This file contains 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
swagger: '2.0' |
This file contains 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
cat $(docker inspect --format='{{.ResolvConfPath}}' <container_name_or_id>) |
NewerOlder