Skip to content

Instantly share code, notes, and snippets.

type osResource struct {
Bucket string
Object string
Generation int64
}
type Policy struct {
Cid string
LinuxInstallParams string
WindowsInstallParams string
if ! _resp="$(curl --retry 15 --retry-delay 10 -sf -H "Authorization: Bearer ${SSM_CS_AUTH_TOKEN}" -H "User-Agent: $userAgent" "$URL")" ; then
errcho "Failed getting url (exit status $?)..."
"$@"
echo "${_resp}"
echo _resp
fi
@ffalor
ffalor / CreateMonoDscLayerZero.py
Last active October 20, 2020 15:12
Create a mono baseline file for Powershell Dsc
import csv
from pytablewriter import MarkdownTableWriter
DSC_FILE_NAME = "w2019MonoLayerZero.ps1"
CSV_FILE_NAME = "DSCResources.csv"
def mdtable(value_matrix):
"""
Generate Markdown table for resource.
@ffalor
ffalor / bolt_inventory.ps1
Created July 12, 2020 17:00
Powershell script to convert CSV to Bolt Inventory
$user = Read-Host -Prompt 'Input username'
$password = Read-Host -Prompt 'Input password'
$csv_path = Read-Host -Prompt 'Input path to inventory CSV'
$yaml_module = "powershell-yaml"
if ($null -eq (Get-InstalledModule -Name $yaml_module -ErrorAction SilentlyContinue)) {
Install-Module $yaml_module
}