This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"workbench.colorCustomizations":{ | |
"terminal.foreground": "#f8f8f2", | |
"terminal.background": "#282a36", | |
"terminal.ansiBlack": "#003541", | |
"terminal.ansiBlue": "#268bd2", | |
"terminal.ansiCyan": "#8be9fd", | |
"terminal.ansiGreen": "#50fa7b", | |
"terminal.ansiMagenta": "#ff79c6", | |
"terminal.ansiRed": "#ff5555", | |
"terminal.ansiWhite": "#eee8d5", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-Parameters { | |
param ($cmdlet) | |
if (Get-Command $cmdlet -ErrorAction SilentlyContinue) { | |
Get-Help -Name $cmdlet -Full | Select-Object -expandProperty Parameters | Select-Object -ExpandProperty Parameter | select -Property Name,PipelineInput | |
} else { | |
Write-Error "$cmdlet not found" -ErrorAction Stop | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BACKUPFOLDER="/opt/backups" | |
TIMESTAMP=$(date '+%Y-%m-%d') | |
if ! command -v jq &> /dev/null; then echo "Cannot find jq. Exiting ..."; exit 1; fi | |
# Get list of running containers | |
CONTAINERS=( $(docker ps --format '{{.Names}}') ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage ./createmacvlan.sh <subnet> <gateway> <interface> [network name] | |
# This is just a script for me to quickly create a macvlan network. | |
# if the first or second arguments are missing give a usage message and exit | |
if [[ -z "$1" || -z "$2" || -z "$3" ]]; then | |
echo "Usage ./createmacvlan.sh <subnet> <gateway> <interface> [network name]" | |
exit 1 | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get the Job ID from PSPrivateMetadata. That's the only thing it contains! | |
$automationJobId = $PSPrivateMetadata.JobId.Guid | |
# Maximum number of instances of this Runbook I want running at any given time | |
$numberOfInstances = 1 | |
# Connect to Azure. With a Managed Identity in this case as that's what I use. | |
# Must connect to Azure before running Get-AzAutomationJob or Get-AzResource | |
try { | |
# From https://docs.microsoft.com/en-us/azure/automation/enable-managed-identity-for-automation#authenticate-access-with-system-assigned-managed-identity |