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
package main | |
import ( | |
"context" | |
"fmt" | |
"os" | |
"strings" | |
"net/url" |
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
// #r "nuget:Azure.Identity,1.3.0" | |
// #r "nuget:Azure.Security.KeyVault.Keys,4.1.0" | |
// #r "nuget:System.CommandLine.DragonFruit,0.3.0-alpha.20574.7" | |
using System; | |
using System.Security.Cryptography; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Azure; | |
using Azure.Identity; |
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
// Copyright 2020 Heath Stewart | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
//furnished to do so, subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all |
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
#Requires -Version 6.0 | |
using namespace System.Security.Cryptography | |
using namespace System.Security.Cryptography.X509Certificates | |
using namespace System.Text | |
<# | |
.Synopsis | |
Generate an X509 v3 certificate. |
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
$vaults = az resource list --resource-type Microsoft.KeyVault/vaults | convertfrom-json | |
$managedHsms = az resource list --resource-type Microsoft.KeyVault/managedHSMs | convertfrom-json | |
$lookup = $vaults + $managedHsms | group id -asstring -ashashtable | |
function get-delta ($dt) { | |
if ($dt -ge [datetime]::now.adddays(-1)) { | |
'<= 1d' | |
} elseif ($dt -ge [datetime]::now.adddays(-7)) { | |
'<= 7d' | |
} elseif ($dt -ge [datetime]::now.adddays(-30)) { |
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
#Requires -Version 5.1 | |
#Requires -Modules 'Appx' | |
[CmdletBinding()] | |
param ( | |
[Parameter(Mandatory=$true, Position=0)] | |
[string] $Destination, | |
[Parameter()] | |
[ValidateNotNullOrEmpty()] |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>netcoreapp3.1</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Azure.Identity" Version="1.2.1" /> | |
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.1.0" /> |
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
$E[0;38;5;231;48;5;31m$M$E[38;5;31;48;5;240m$S$E[38;5;231m$P$S$E[0;38;5;240m$E[0m$_$E[38;5;231;48;5;240m$+$E[0;38;5;240m$E[0m$S |
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
{ | |
"$help": "https://aka.ms/terminal-documentation", | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"actions": | |
[ | |
{ | |
"command": "closePane", | |
"keys": "ctrl+alt+w" | |
}, | |
{ |
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
{ | |
"editor.fontFamily": "Fira Code, Hack, Consolas, monospace", | |
"editor.fontLigatures": true, | |
"editor.fontSize": 12, | |
"editor.renderControlCharacters": false, | |
"editor.renderWhitespace": "all", | |
"diffEditor.ignoreTrimWhitespace": false, | |
"terminal.external.windowsExec": "C:\\Program Files\\PowerShell\\7\\pwsh.exe", | |
"terminal.integrated.shell.windows": "C:\\Program Files\\PowerShell\\7\\pwsh.exe", | |
"terminal.integrated.shellArgs.windows": [ |