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
time="2019-06-14T00:20:28Z" level=info msg="running version stable-2.3.2" | |
INFO [ 0.001275s] linkerd2_proxy::app::main using destination service at Some(ControlAddr { addr: Name(NameAddr { name: "linkerd-destination.linkerd.svc.cluster.local", port: 8086 }), identity: Some("linkerd-controller.linkerd.serviceaccount.identity.linkerd.cluster.local") }) | |
INFO [ 0.001575s] linkerd2_proxy::app::main using identity service at Name(NameAddr { name: "linkerd-identity.linkerd.svc.cluster.local", port: 8080 }) | |
INFO [ 0.001750s] linkerd2_proxy::app::main routing on V4(127.0.0.1:4140) | |
INFO [ 0.001961s] linkerd2_proxy::app::main proxying on V4(0.0.0.0:4143) to None | |
INFO [ 0.002152s] linkerd2_proxy::app::main serving admin endpoint metrics on V4(0.0.0.0:4191) | |
INFO [ 0.002277s] linkerd2_proxy::app::main protocol detection disabled for inbound ports {25, 3306} | |
INFO [ 0.002407s] linkerd2_proxy::app::main protocol detection disabled for outbound ports {25, 3306} | |
INFO [ 0.004537s] trust_dns_proto:: |
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/bash | |
MINITEMS=1 | |
function usage { echo " Usage: $0 [-d] [-a author] [-c file.txt] [-h] dir1 [dir1 ...] -d debug, don't actual run command -a author name of the author -c copyright override default copyright file -h this help message " exit 1 } | |
# Set our defaults: | |
DEBUG=false DEBUGCMD= AUTHOR= COPYRIGHT=copyright.txt | |
# Process command-line arguments, possibly overriding defaults | |
args='getopt da:c:h $*' | |
if [ $? != 0 ] then usage fi | |
set -- $args | |
for i do |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
dlv test -- -test.v -test.run=TestFuncName | |
b filename:ln |
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
#openjdk11: | |
#https://blog.codecentric.de/en/2017/09/jvm-fire-using-flame-graphs-analyse-performance/ | |
#https://www.slideshare.net/brendangregg | |
sudo apt-install openjfx | |
java --module-path /usr/share/openjfx/lib --add-modules=javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web -cp ~/honest-profiler/honest-profiler.jar com.insightfullogic.honest_profiler.ports.console.FlameGraphDumperApplication ~/Downloads/honest-profiler-log-05.hpl ~/Downloads/honest-profiler-log-05.folded | |
git clone --depth 1 https://github.com/brendangregg/FlameGraph | |
cd FlameGraph |
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
#name and status | |
k get zb -o json | jq -r '.items[] | [.metadata.name, .status.ready] | @tsv' | |
#get pods by label, show image and ready status | |
kgp --all-namespaces -l app.kubernetes.io/component=gateway -o json | jq -r '.items[] |[ .metadata.namespace, .status.containerStatuses[0].ready, .status.containerStatuses[0].image ] | @tsv' | grep alpha <<< |
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
%s/^\([a-z-]\+\):/.PHONY: \1\r\1:/ |
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
#requires jq >= 1.6 | |
k get secret -o json -n <namespace> | jq -r '.items[] | [.metadata.name, (.data |map_values(@base64d) )]' | |
# only keys | |
k get secret -o json -n <namespace> | jq -r '.items[] | [.metadata.name, (.data |map_values(@base64d) )] | to_entries | .[] | [.value] ' | grep ':' | |
# better format | |
k get secret -o json -n accounts-web | jq -r '.items[] | [.metadata.name, (.data |map_values(@base64d) )]' | grep --color=never -P '\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
.PHONY: sops | |
SOPS_URL=$(shell curl -s "https://api.github.com/repos/mozilla/sops/releases/latest" | grep -o "http.*sops_.*_amd64\.deb") | |
sops: $(curl) | |
wget $(SOPS_URL) -O ~/Downloads/sops.deb | |
sudo apt install ~/Downloads/sops.deb |
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
log-format-escape-json: "true" | |
http-snippet: | | |
map $msec $timestamp_secs { ~(.*)\..* $1; } | |
map $msec $timestamp_nanos { ~.*\.(?<tsn>.*) "${tsn}000000"; } | |
log-format-upstream: '{"timestampSeconds":"$timestamp_secs", "timestampNanos":"$timestamp_nanos", "time_epoch":"$msec", "time_iso8601":"$time_iso8601", "remote_addr":"$proxy_protocol_addr", "x-forward-for":"$proxy_add_x_forwarded_for", "request_id":"$req_id", "remote_user":"$remote_user", "bytes_sent":$bytes_sent, "request_time":$request_time, "status":$status, "vhost":"$host", "request_proto":"$server_protocol", "path":"$uri", "request_query":"$args", "request_length":$request_length, "duration":$request_time, "method":"$request_method", "http_referrer":"$http_referer", "http_user_agent":"$http_user_agent" }' |