Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Logged into org account

Brett Miller brettmillerb

💭
Logged into org account
View GitHub Profile
@brettmillerb
brettmillerb / profile.ps1
Last active Oct 16, 2021
Mac Pwsh Profile
View profile.ps1
Import-Module -Name Toolbox
Import-Module -Name Microsoft.PowerShell.UnixCompleters
Import-Module -Name Terminal-Icons
function BackOne {
Set-Location ..
}
function BackTwo {
Set-Location ../..
}
View Get-TwitchEvent.ps1
function Get-TwitchEvent {
[CmdletBinding(DefaultParameterSetName = 'Standard')]
param (
[Parameter(Mandatory,
ParameterSetName = 'Standard')]
[string]
$UserName,
[Parameter(Mandatory,
ParameterSetName = 'Pipeline',
@brettmillerb
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');",
@brettmillerb
brettmillerb / Export-AzKeyVaultCertficate.ps1
Last active May 24, 2021
Export-AzKeyVaultCertficate.ps1
View Export-AzKeyVaultCertficate.ps1
function Export-AzKeyVaultCertificate {
[CmdletBinding()]
param (
[parameter(Mandatory)]
[string]
$VaultName,
[Parameter(Mandatory)]
[string]
$CertName,
@brettmillerb
brettmillerb / setup.sh
Last active Apr 9, 2021
New Mac Setup
View setup.sh
# Check for Homebrew,
# Install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
# Update homebrew recipes
echo "Updating homebrew..."
brew update
@brettmillerb
brettmillerb / BeRightBack.html
Last active Apr 7, 2021
Twitch Stream Starting Animation
View BeRightBack.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
body {
View Get-RandomString.ps1
function Get-RandomString {
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[ValidateRange(12,[int]::MaxValue)]
[int]
$StringLength,
[int]
$SpecialCharacters = 4
)
@brettmillerb
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 zshrc-theme
# Path to your oh-my-zsh installation.
export ZSH="/Users/brett.miller/.oh-my-zsh"
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
# Set name of the theme to load
ZSH_THEME="powerlevel9k/powerlevel9k"
DISABLE_AUTO_TITLE="true"
# Plugins
View DockerFile
# escape=`
ARG fromTag=latest
ARG WindowsServerCoreRepo=mcr.microsoft.com/windows/servercore
# Use server core as an installer container to extract PowerShell,
# As this is a multi-stage build, this stage will eventually be thrown away
FROM ${WindowsServerCoreRepo}:${fromTag} AS installer-env
ARG PS_VERSION=6.2.0
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/PowerShell-${PS_VERSION}-win-x64.zip