- inline - cmd + shift + c
- block - cmd + shift + e
- select any code block, triple click it
GitHub issues and comments - w/Refined GitHub Extension
- inline - double click to highlight the string, then press ` to wrap in backticks
- block - ??
gh auth login to authenticateTIL: For a consistent fingerprint auth experience on Mac, for both GUI and CLI, I learned that I can add this snippet to the top of /etc/pam.d/sudo:
auth sufficient pam_tid.so
and now everytime I get a password prompt, I instead get a fingerprint popup modal. Saves a ton of time if you have a longer password.
| I want to create a boiler plate project to create CLI commands that wrap around docker. Then have all the scripting in a Docker image and the CLI program passes the args and any ENV vars for secrets (api access) to the docker run. | |
| I am not easily finding anything like this, but this is a start: | |
| https://andrewlock.net/packaging-cli-programs-into-docker-images-to-avoid-dependency-hell/ |
| # sets the default zone for your gcloud CLI. It means it will apply to all your future gcloud commands coming from that same terminal. | |
| gcloud config set compute/zone <zone> | |
| # default value for this specific project only. | |
| gcloud compute project-info add-metadata --metadata google-compute-default-zone=<zone> | |
| # https://www.reddit.com/r/googlecloud/comments/brshdg/how_to_set_correctly_default_zoneregion_via_gcloud/ |
| functions known_hosts_remove_line | |
| # Defined via `source` | |
| function known_hosts_remove_line | |
| # get total number of lines in the known_hosts file | |
| set total_lines (wc -l < ~/.ssh/known_hosts | tr -d ' ') | |
| if test $argv[1] -gt $total_lines | |
| echo "Line number $argv[1] exceeds total lines ($total_lines) in ~/.ssh/known_hosts" | |
| return 1 | |
| end | |
| sed -i '' "$argv[1]d" ~/.ssh/known_hosts |
| # enable bash strict mode: exit on error (-e), undefined variables (-u), & pipe failures (-o pipefail) | |
| set -euo pipefail |
| For a consistent fingerprint auth experience on Mac, for both GUI and CLI, I learned that I can add the below and everytime I would have gotten a password prompt, I now instead get a fingerprint popup modal. Saves a ton of time if you have a longer password. | |
| /etc/pam.d/sudo Add this line to the TOP, bottom won't work. | |
| ``` | |
| auth sufficient pam_tid.so | |
| ```` |
The docs are here but don't specify this level of detail, I found this through trial/error: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_config
Also see, prometheus/prometheus#12924.
Instance ID (https://grafana.com/orgs/hedera/hosted-metrics/{{USERNAME/INSTANCE_ID}}authorization:| # enable bash strict mode: exit on error (-e), undefined variables (-u), & pipe failures (-o pipefail) | |
| set -euo pipefail |