Skip to content

Instantly share code, notes, and snippets.

View matttrach's full-sized avatar

Matt Trachier matttrach

View GitHub Profile
@matttrach
matttrach / gist:378c567a80fdfda55ff7c2fb4e8ebc69
Created July 11, 2023 01:10
Convert RKE2 Help CLI to Terraform variables
#!/bin/bash
help_output=$(rke2 help server | grep -- '--')
json_string=""
while IFS= read -r line
do
name_type=$(echo "$line" | awk -F'(' '{ gsub(/^[ \t]+|[ \t]+$/, "",$1); gsub(/,/, "",$1); gsub(/--/,"",$1); print $1 }')
description=$(echo "$line" | awk -F'(' '{ gsub(/^[ \t]+|[ \t]+$/, "", $2); print "("$2 }')
@matttrach
matttrach / keybase.md
Created August 16, 2018 15:17
Keybase Proof

Keybase proof

I hereby claim:

  • I am matttrach on github.
  • I am matttrach (https://keybase.io/matttrach) on keybase.
  • I have a public key ASDwFf3smaVnrRbC1J0IBPCHZq2ECvd76zuAluLWkfZc8Ao

To claim this, I am signing this object: