Aapje is baas tech blog

Recent Articles:

Display AWS Cloudformation logs in pipelines

Using cloudformation is great, it gives you insane super powers but there are some small things that annoy me when using it in pipelines. My biggest issue is that it is not displaying the steps it takes in kind of real time'ish to stdout, so that's where the following snippet …


Create your own Wifi QR

If you're tired of handing out wifi credentials on paper maybe this trick will help you out.

Example with qrencode

This tool creates a qr in your terminal if that's something you might need:

   echo 'WIFI:S:The Promised Lan;T:WPA;P:Thisisthekey!;;' | qrencode -t ansiutf8
█████████████████████████████████████
█████████████████████████████████████
████ ▄▄▄▄▄ █▄▀ ▀ ▄ ▀█ ▀███ ▄▄▄▄▄ ████
████ █   █ █   █▀▀▄▀▀  █ █ █   █ ████
████ █▄▄▄█ █▄█▀ ▄▄█ █▀█▄▄█ █▄▄▄█ ████
████▄▄▄▄▄▄▄█▄█ █ █ █▄▀▄█ █▄▄▄▄▄▄▄████
████▄   ▀▀▄█ █ ▄▀█▀▄█▀█ ▄▄▀█  ▄█ ████
████ ▀█ ▄▄▄▀   ▄█▀█▄█▄ █  ██▀▀█ ▄████
████▄▀██ ▀▄▀ ▄▄▀▄▄█ ▄▄▄▀▀   █ ▄▄ ████
█████▀ ▄ █▄▄▄ ▀█▄▀█▀  █▄█  ██  ▄▄████
████▄ ▄▀▄ ▄▀ ▄ ▄█  ▀ ▀█▀█▀▄▄▄▀ ▄█████
████▄█▀▀▀▀▄▀▀█  ▀▀▄ █▀▄▀▀██▀▄█  ▀████
█████▄█▄▄█▄▄ ▀█▄ █▀▄▄▄▀  ▄▄▄ ▀███████
████ ▄▄▄▄▄ ██▄▄█ ▄▄█▄ █  █▄█ ▀▄▄▀████
████ █   █ █▀▀▀ █ ██▄█ ▄▄▄ ▄▄  ██████
████ █▄▄▄█ █  █▄▀ ▄▀▄▀▄ ▀ ▀█▄▄█▀ ████
████▄▄▄▄▄▄▄█▄█▄▄▄█▄▄█████▄█▄█▄███████
█████████████████████████████████████
█████████████████████████████████████

qrencode

Make it …


Update all docker images

When you're running images with the tag latest on you local machine they might need some updates from time to time. With this one liner you pull the newest version in of all the images you already have locally.

Update all images

for image in $(sudo docker image ls | awk …

Mass delete cloudformation stacks

The oneliner:

# This will delete all stacks in the account connected to yourprofile with the string "delete-me" in the stackname
for StackName in $(aws --profile yourprofile cloudformation list-stacks --query 'StackSummaries[?contains(StackName, `delete-me`) == `true`] .StackName' --output text); do echo $StackName ; aws --profile yourprofile cloudformation delete-stack --stack-name $StackName ; done