$ kubectl apply -f aws-elb-service.yaml -n ingress-nginx
$ kubectl apply -f nginx-configmap.yml -n ingress-nginx
| jsonData='[{"name": "name#1","value": "value#1"},{"name": "name#2","value": "value#2"}]' | |
| for row in $(echo "${jsonData}" | jq -r '.[] | @base64'); do | |
| _jq() { | |
| echo "${row}" | base64 --decode | jq -r "${1}" | |
| } | |
| # OPTIONAL | |
| # Set each property of the row to a variable | |
| name=$(_jq '.name') | |
| value=$(_jq '.value') |
$ kubectl apply -f aws-elb-service.yaml -n ingress-nginx
$ kubectl apply -f nginx-configmap.yml -n ingress-nginx
| $ curl https://merj.com --tlsv1.0 --verbose | |
| * Rebuilt URL to: https://merj.com/ | |
| * Trying 45.63.96.124... | |
| * TCP_NODELAY set | |
| * Connected to merj.com (45.63.96.124) port 443 (#0) | |
| * ALPN, offering h2 | |
| * ALPN, offering http/1.1 | |
| * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH | |
| * successfully set certificate verify locations: | |
| * CAfile: /etc/ssl/cert.pem |
| kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod |
service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-nameservice.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefixservice.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)| """ | |
| Create a spinning cursor or progress bar in terminal can be useful | |
| for some scripts. | |
| 1. Use '\r' to move cursor back to the line beginning. Or use '\b' | |
| to erase the last character. | |
| 2. The standard out of Python is buffered, which means it will | |
| collect some data written to standard out before it actually | |
| writes to the terminal. | |
| The code snippet |
Get Git log in JSON format
git log --pretty=format:'{%n "commit": "%H",%n "abbreviated_commit": "%h",%n "tree": "%T",%n "abbreviated_tree": "%t",%n "parent": "%P",%n "abbreviated_parent": "%p",%n "refs": "%D",%n "encoding": "%e",%n "subject": "%s",%n "sanitized_subject_line": "%f",%n "body": "%b",%n "commit_notes": "%N",%n "verification_flag": "%G?",%n "signer": "%GS",%n "signer_key": "%GK",%n "author": {%n "name": "%aN",%n "email": "%aE",%n "date": "%aD"%n },%n "commiter": {%n "name": "%cN",%n "email": "%cE",%n "date": "%cD"%n }%n},'The only information that aren't fetched are:
%B: raw body (unwrapped subject and body)%GG: raw verification message from GPG for a signed commit| openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem | |
| chmod 600 id_rsa.pem |
| /** | |
| * Find the longest class names in Spring. | |
| * Also find FactoryFactory classes. | |
| * a goof-off project by @thom_nic | |
| */ | |
| import java.util.jar.* | |
| defaultTasks 'longest', 'factoryfactory' |