Skip to content

Instantly share code, notes, and snippets.

Console Markdown

Syntax

  • user matches regex /[a-zA-Z0-9]{1}[.*]{1,}/
  • host matches regex /[.*]{1,}/
user:host$ command "arugment" --flag --option=value # inline command
#!/bin/bash
# Author: Blake <github.com/blakenorthone>
# Description: Transforms JSON input of AWS SSM parameters into dotenv (.env) file format.
#
# Usage:
# - Displaying and saving output using tee:
# aws ssm get-parameters-by-path --path /Dev/App --output json --region us-east-1 | ./json_to_dotenv.sh | tee .env
# - Redirecting output to a file (silent mode):
# aws ssm get-parameters-by-path --path /Dev/App --output json | ./json_to_dotenv.sh > .env
@blakenorthone
blakenorthone / jamf-removal
Last active March 19, 2024 14:43
jamf-removal
#!/bin/bash
#
# be sure to chmod a+x jamf-removal (macOS can double-click no-extension files with #!/bin/bash)
#
# source: https://community.jamf.com/t5/jamf-pro/manual-remove-jamf-components-and-configs/m-p/184370/highlight/true#M173193
# Remove all system profiles
for identifier in $(/usr/bin/profiles -L | awk "/attribute/" | awk '{print $4}'); do
/usr/bin/profiles -R -p "$identifier" >/dev/null 2>&1
done