Skip to content

Instantly share code, notes, and snippets.

@mpontillo
mpontillo / maas-cli-commands.sh
Last active November 23, 2023 16:10
MAAS jq tricks and how to move interfaces between fabrics (via changing the interface's VLAN)
maas refresh
profile=$(maas list | head -1 | awk '{ print $1 }')
# This generates a single JSON object.
maas $PROFILE machines read | jq '[.[] | {hostname:.hostname, system_id: .system_id, status:.status}]'
...
maas $PROFILE machines read | jq '.[] | {hostname:.hostname, system_id: .system_id, status:.status}' --compact-output
{"hostname":"pxe-bond1","system_id":"xrey6h","status":4}
@vo
vo / quad_video_wall.sh
Last active July 5, 2020 09:37
basic gstreamer quad video wall.
#!/bin/bash
# Basic gstreamer quad video wall application.
# Displays 4 videos.
# They have to be synced to eachother and playing for this to work.
PARAMS_NEEDED=4
if [ $# -ne $PARAMS_NEEDED ]
then