Skip to content

Instantly share code, notes, and snippets.


Justin Grote JustinGrote

View GitHub Profile
JustinGrote / paxwatch.ps1
Last active May 31, 2023 15:27
PAX Watcher Script
View paxwatch.ps1
Write-Host -fore green '===PAX CHECKER==='
Write-Host -fore green '===This will open a browser to the ticket window if PAX goes on sale==='
$result = $null
do {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Write-Host -fore gray "$(Get-Date): Checking ShowClix for PAX"
$paxEvents = (Invoke-RestMethod -Headers @{'Cache-Control' = 'max-age=0'} '') |
Where-Object { $PSItem.event -match 'PAX' -and $PSItem.event -notmatch 'BYOC|Special|Media|Exhibitor' }
$result = $paxEvents |
Where-Object {
JustinGrote / settings.json
Last active May 28, 2023 08:56
Justin Grote's Visual Studio Code Settings
View settings.json
"[bicep]": {
"editor.defaultFormatter": "ms-azuretools.vscode-bicep",
"editor.suggest.showWords": false,
"editor.suggest.snippetsPreventQuickSuggestions": false,
"editor.suggestSelection": "first",
"editor.wordBasedSuggestions": false,
"files.insertFinalNewline": true
"[csharp]": {
JustinGrote / MSBuild.xsd
Last active April 18, 2023 20:58
MSBuild XSD Schema for VSCode Validation including some missing options
View MSBuild.xsd
<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace=""
<!-- =================== IMPORT COMMON SCHEMA =========================== -->
<xs:include schemaLocation=""/>
JustinGrote / pingometer.json
Created April 12, 2023 16:55
Scoop Package Manifest for PingoMeter
View pingometer.json
"version": "0.9.9",
"description": "A small portable program that show your ping in Windows system tray.",
"homepage": "",
"license": "MIT",
"url": "",
"hash": "065C609C9AE945F55AA9476195091BE0A8D8D112B8ABDAB9392CE400981C88E4",
"extract_dir": "PingoMeter",
"shortcuts": [
JustinGrote / CodeTunnel.ps1
Last active March 31, 2023 17:34
Visual Studio Code Tunnel bootstrap via PowerShell (works in Azure Cloud Shell)
View CodeTunnel.ps1
#Custom name for this cloud shell, if desired
#Auto-accept the licensing parameters =
#Use the insiders version of code CLI
$ErrorActionPreference = 'Stop'
$ProgressPreference = 'SilentlyContinue'
JustinGrote / Get-ScriptModules.ps1
Last active April 15, 2023 02:06
Find the module names for all commands used in a script
View Get-ScriptModules.ps1
#requires -version 7
using namespace System.Management.Automation.Language
using namespace Collections.Generic.Queue
function Get-ScriptModules {
Given a script, returns a list of all the modules it uses.
JustinGrote / EasyFormat.ps1
Created March 9, 2023 16:40
A proxy for Format-Table to apply the resultant view or save it as a format definition
View EasyFormat.ps1
using namespace System.Management.Automation
using namespace System.Collections
function ConvertFrom-Format {
Converts Format-Table output to a format that can be used with Add-FormatTable
#The name of the format view definition assigned to the format data. Default is 'CustomTableView
[ValidateNotNullOrEmpty()][string]$Name = 'CustomTableView',
JustinGrote / settings.jsonc
Created February 22, 2023 21:12
Enable Intellisense for .csproj files in Visual Studio Code
View settings.jsonc
//NOTE: Your .csproj file MUST have a dummy <Target Name='MakeSchemaHappy' /> to satisfy the schema or you will get an error
"xml.fileAssociations": [
"pattern": "**/*.csproj",
"systemId": ""
"xml.validation.namespaces.enabled": "onNamespaceEncountered"
JustinGrote / TestICMP.csproj
Last active February 14, 2023 18:10
Async Pinger Powershell Cmdlet in C#
View TestICMP.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PackageReference Include="System.Management.Automation" Version="7.3.2" PrivateAssets="all" />
JustinGrote / Get-MgServicePrincipalPermission.ps1
Created December 1, 2022 23:51
Get a list of application and delegated permissions for a service principal, similar to what the Azure Portal shows
View Get-MgServicePrincipalPermission.ps1
#requires -version 7
using namespace Microsoft.Graph.PowerShell.Models
using namespace System.Collections.Generic
function Get-MgServicePrincipalPermission {
begin {