In parallel! Saves output to a file so you can simply do open /tmp/bucket-policies.nuon
after:
^aws s3api list-buckets
| from json
| get Buckets.Name
| par-each { |bucket|
let policy = try {
aws ecr describe-repositories | from json | get repositories.repositoryName | |
| sort | |
| each { |repo| | |
let scanOnPush = (aws ecr batch-get-repository-scanning-configuration --repository-names $repo | |
| from json | |
| get scanningConfigurations | |
| first | |
| get scanOnPush | |
) | |
print $"Repository: ($repo), Scanning on push: ($scanOnPush)" |
-- Example of using coroutines with slow IO operations in Neovim. | |
-- It shows how to run coroutines sequentially and in "parallel". | |
-- The word "parallel" is in quotes because Lua coroutines are not actually | |
-- running in parallel, but the IO operations that they start are. | |
-- The coroutines are paused and resumed as the IO operations complete. | |
-- To run this example, put this file somewhere and do `:luafile path/to/coroutines.lua` in nvim. | |
local co = coroutine | |
vim.cmd "new" |
fleetctl user create --name 'Gitops User' \
--password "$(cat /dev/urandom | tr -cd '[:graph:]' | head -c 32)" \
--email [email protected] \
--api-only \
--global-role admin
#!/bin/bash | |
# This script diffs the content of two container images | |
# USAGE: ./diff-container-images.sh <registry>/<repo> <tag1> <tag2> | |
# strict mode | |
set -euo pipefail | |
registry_repo=$1 | |
tag1=$2 |
mkfifo /tmp/pcap.fifo
# Note: DO NOT use the -it option with exec!
kubectl exec deploy/some-pod -c istio-proxy -- bash -c "sudo tcpdump -s0 -U -n -i eth0 -w - " > /tmp/pcap.fifo
wireshark -k -i /tmp/pcap.fifo
I keep tripping up because I forget to add --hidden
and use *
instead of **
:
rg --hidden --glob='**/.github/**' <PATTERN>
With the kitty terminal, you can send desktop notifications with the following (example taken from the kitty docs):
printf '\x1b]99;i=1:d=0;Hello world\x1b\\'
printf '\x1b]99;i=1:d=1:p=body;This is cool\x1b\\'
For details about how this works is here.