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
using namespace System.Collections.Generic | |
class Pet { | |
[string]$Name | |
[string]$Type | |
hidden [int] GetHashCode() { | |
$uniqueString = $this.Name + $this.Type | |
return $uniqueString.GetHashCode() | |
} |
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
using namespace System.Management.Automation | |
using namespace System.Collections.Generic | |
[List[Job2]]$jobs = @() | |
[List[Object]]$Result = @() | |
$baseUri = 'https://www.powershellgallery.com/api/v2/Packages?$skip=' | |
$maxPackages = 309000 | |
for ($i = 0; $i -lt $maxPackages; $i += 100) { |
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
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"any": { | |
"anyOf": [ | |
{ "$ref": "#/definitions/tabstop" }, | |
{ "$ref": "#/definitions/placeholder" }, | |
{ "$ref": "#/definitions/choice" }, | |
{ "$ref": "#/definitions/variable" }, |
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 -module Az.CognitiveServices | |
using namespace Microsoft.Azure.Commands.Management.CognitiveServices.Models | |
function Get-PodBeanPodcast ($Name = 'powershellpodcast') { | |
Invoke-RestMethod https://feed.podbean.com/$Name/feed.xml | |
} | |
#region Base | |
function Connect-AzSpeech { | |
[OutputType([AzSpeechContext])] |
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
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'} 'https://www.showclix.com/rest.api/Partner/48/events').psobject.properties.value | | |
Where-Object { $PSItem.event -match 'PAX' -and $PSItem.event -notmatch 'BYOC|Special|Media|Exhibitor' } | |
$result = $paxEvents | | |
Where-Object { |
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
{ | |
"[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]": { |
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
<?xml version="1.0" encoding="utf-8"?> | |
<xs:schema targetNamespace="http://schemas.microsoft.com/developer/msbuild/2003" | |
xmlns:xs="http://www.w3.org/2001/XMLSchema" | |
xmlns:msb="http://schemas.microsoft.com/developer/msbuild/2003" | |
elementFormDefault="qualified"> | |
<!-- =================== IMPORT COMMON SCHEMA =========================== --> | |
<xs:include schemaLocation="https://raw.githubusercontent.com/dotnet/msbuild/main/src/MSBuild/Microsoft.Build.xsd"/> | |
<!-- ========= ADD CUSTOM ITEMS, PROPERTIES, AND TASKS BELOW ======= --> |
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
{ | |
"version": "0.9.9", | |
"description": "A small portable program that show your ping in Windows system tray.", | |
"homepage": "https://github.com/EFLFE/PingoMeter", | |
"license": "MIT", | |
"url": "https://github.com/EFLFE/PingoMeter/releases/download/0.9.9/PingoMeter_r0.9.9.zip", | |
"hash": "065C609C9AE945F55AA9476195091BE0A8D8D112B8ABDAB9392CE400981C88E4", | |
"extract_dir": "PingoMeter", | |
"shortcuts": [ | |
[ |
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
#require -version 5.1 | |
#Usage: iwr https://tinyurl.com/VSCodeServer | iex | |
#Parameterized usage: & ([ScriptBlock]::Create((iwr https://tinyurl.com/VSCodeServer))) -Your -Options | |
param( | |
#Path to install the vscode binary to. This defaults to a folder in your Local AppData path. Must be writable by your current user without sudo | |
[ValidateNotNullOrEmpty()] | |
[string]$InstallPath = $(Join-Path -Path ([System.Environment]::GetFolderPath('LocalApplicationData')) -ChildPath 'vscode-cli'), | |
#Installation architecture. This is normally autodetected. | |
$Arch, | |
$OS, |
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 7 | |
using namespace System.Management.Automation.Language | |
using namespace Collections.Generic.Queue | |
function Get-ScriptModules { | |
<# | |
.SCRIPTBLOCK | |
Given a script, returns a list of all the modules it uses. | |
#> |