Skip to content

Instantly share code, notes, and snippets.

Working from home

Brett Miller brettmillerb

Working from home
View GitHub Profile
brettmillerb / azure-pipelines.yml
Created Jul 7, 2022
Stackoverflow Pipelines Example
View azure-pipelines.yml
- task: AzureCLI@2
displayName: Check Azure Functions Deployed
RESOURCE_GROUP: $(ResourceGroup)
FUNCTION_NAME: $(FunctionName)
azureSubscription: Microsoft Azure Subscription
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
brettmillerb / Get-QuotaPercentage.ps1
Created Jan 18, 2022
PowerShell Azure Subscription Quota Percentage Helper Function
View Get-QuotaPercentage.ps1
function Get-QuotaPercentage {
param (
process {
foreach ($item in $InputObject) {
brettmillerb / AdHealthCheck.ps1
Created Dec 8, 2021
AD Health Check Report - Really Old Example
View AdHealthCheck.ps1
[String]$domainname = '',
[String]$reportpath = "E:\ADHealthReport\",
[String]$percentlow = 10,
[String]$sendemailtime = "07.00A"
brettmillerb / Set-VSCodesettings.ps1
Created Nov 5, 2021
PowerShell function to set VSCode settings.json properties
View Set-VSCodesettings.ps1
function Set-VSCodeSetting {
Function for setting VS Code settings from command line
This function allows programmatic update of VS Code settings.json file
The font size to set
brettmillerb / markdown.json
Created Sep 6, 2021
Jekyll Blog Post VSCode Snippet
View markdown.json
// Place your snippets for markdown here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
View Get-RandomString.ps1
function Get-RandomString {
param (
$SpecialCharacters = 4
brettmillerb /
Last active Apr 9, 2021
New Mac Setup
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL"
# Update homebrew recipes
echo "Updating homebrew..."
brew update
View Open-NativeApplication.ps1
function Open-NativeApplication {
param (
param($Command, $Parameter, $WordToComplete, $CommandAst, $FakeBoundParams)
(Get-ChildItem /Applications).name -like "$WordToComplete*" | % {"'$_'"}
brettmillerb / packer.json
Created Sep 15, 2020
Packer Template Windows Updates
View packer.json
"builders": [
"capture_container_name": "vsts-buildimagetask",
"capture_name_prefix": "{{user `capture_name_prefix`}}",
"client_id": "{{user `client_id`}}",
"client_secret": "{{user `client_secret`}}",
"communicator": "winrm",
"image_offer": "{{user `image_offer`}}",
"image_publisher": "{{user `image_publisher`}}",
View Get-SendGridBouncedAddress.ps1
function Get-SendGridBouncedAddress {
param (