docker run -it --rm -u yap ubuntu /bin/bash # run as non-root user
docker run -it --rm --security-opt=no-new-privileges ubuntu /bin/bash
docker run -it --rm --cap-drop all --cap-add NET_ADMIN ubuntu /bin/bash
docker run -it --rm --read-only --tmpfs /opt ubuntu /bin/bash
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
| func selectionSort(items []int) { | |
| for x := 0; x < len(items) - 1; x++ { | |
| min := x | |
| for y := x+1; y < len(items); y++ { | |
| if items[y] < items[min] { | |
| min = y | |
| } | |
| } | |
| items[x], items[min] = items[min], items[x] | |
| } |
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
| PUT /_template/fluentbit | |
| { | |
| "fluenbit" : { | |
| "order" : 0, | |
| "index_patterns" : [ | |
| "fluentbit-*" | |
| ], | |
| "settings" : { | |
| "index" : { | |
| "number_of_shards" : "10" |
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 certificaterequest | |
| kubectl describe certificaterequest X | |
| kubectl get order | |
| kubectl describe order X | |
| kubectl get challenge | |
| kubectl describe challenge X |
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
| set -eu | |
| REGION_SEPARATOR='--' | |
| ec2_instance_id="$1" | |
| ssh_user="$2" | |
| ssh_port="$3" | |
| ssh_public_key_path="$4" | |
| ssh_public_key="$(cat "${ssh_public_key_path}")" | |
| ssh_public_key_timeout=60 |