This file contains hidden or 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
{ | |
"controls_image": "", | |
"filters": [ | |
], | |
"inputs": [ | |
{ | |
"channel": 1, | |
"events": [ | |
{ | |
"message": "hihatposition", |
This file contains hidden or 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
Get-ChildItem -Directory | ForEach-Item { | |
$folder = $_.Name | |
$LATEST_COMMIT = $(git rev-list -n 1 --no-merges HEAD) | |
$FOLDER1_COMMIT = $(git log -1 --format=format:%H --full-diff ./${folder}/) | |
Write-Output $folder | |
Write-Output "latest commit $LATEST_COMMIT" | |
Write-Output "folder commit $FOLDER1_COMMIT" |
This file contains hidden or 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
azurerm_monitor_activity_log_alert.main: Creating... | |
2021/02/01 11:38:15 [DEBUG] EvalApply: ProviderMeta config value set | |
2021/02/01 11:38:15 [DEBUG] azurerm_monitor_activity_log_alert.main: applying the planned Create change | |
2021-02-01T11:38:15.851+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: [DEBUG] AzureRM Request: | |
2021-02-01T11:38:15.851+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: GET /subscriptions/b080ddce-e747-4026-98bb-fa27f98d0ab5/resourceGroups/example-resources/providers/microsoft.insights/activityLogAlerts/example-activitylogalert?api-version=2017-04-01 HTTP/1.1 | |
2021-02-01T11:38:15.851+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: Host: management.azure.com | |
2021-02-01T11:38:15.851+1100 [DEBUG] plugin.terraform-provider-azurerm_v2.0.0_x5: User-Agent: Go/go1.12.6 (amd64-darwin) go-autorest/v13.3.0 Azure-SDK-For-Go/v38.1.0 insights/2019-06-01 HashiCorp Terraform/0.14.5 (+https://www.terraform.io) Terraform Plugin SDK/1.6.0 terraform-provider-azurerm/2.0.0 pid-2 |
This file contains hidden or 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
# http://knowyourmeme.com/memes/mocking-spongebob | |
# | |
# This snippet lives in my profile for quick access | |
Function Get-Spongebob | |
{ | |
[CmdletBinding()] | |
param | |
( |
This file contains hidden or 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
# Birthday Problem aka Birthday Paradox. | |
# Calculates probability of a collision in a given range of random values | |
# uses a coarse approximation from | |
# https://en.wikipedia.org/wiki/Birthday_problem#Approximations | |
Function Get-CollisionChance | |
{ | |
param($range, $repetitions) | |
$d = [double]$range |
This file contains hidden or 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
$downloadUrl = "http://download.microsoft.com/download/C/F/F/CFF3A0B8-99D4-41A2-AE1A-496C08BEB904/WebPlatformInstaller_amd64_en-US.msi" | |
$downloadtarget = ([uri]$downloadUrl).segments | select -last 1 | |
Invoke-WebRequest $downloadUrl -OutFile $env:tmp\$downloadtarget | |
Start-Process $env:tmp\$downloadtarget '/qn' -PassThru | Wait-Process | |
Set-Location ($env:ProgramFiles + "\Microsoft\Web Platform Installer") | |
.\WebpiCmd.exe /Install /Products:'UrlRewrite2,ARRv3_0' /AcceptEULA /Log:$env:tmp\WebpiCmd.log |
This file contains hidden or 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
# Here's our array of files | |
$files = @( | |
"https://download.octopusdeploy.com/octopus/Octopus.3.13.9-x64.msi", | |
"https://download.octopusdeploy.com/octopus/Octopus.Tentacle.3.13.9-x64.msi", | |
"https://download.octopusdeploy.com/octopus/Octopus.3.13.10-x64.msi", | |
"https://download.octopusdeploy.com/octopus/Octopus.Tentacle.3.13.10-x64.msi" | |
# etctera | |
) | |
# loop through the array, extract the filename using uri segments, download the file |
This file contains hidden or 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
# gets past a problem in Invoke-WebRequest which causes issues with UTF-8 Responses (such as those from raw.githubusercontent.com) | |
Function Invoke-UTF8WebRequest | |
{ | |
# based loosely on https://gist.github.com/angel-vladov/9482676 | |
param($uri) | |
[Net.HttpWebRequest]$req = [Net.WebRequest]::Create($Uri) | |
[Net.HttpWebResponse]$res = $req.GetResponse() | |
$sr = [IO.StreamReader]::new($res.GetResponseStream()) | |
$body = $sr.ReadToEnd() |
This file contains hidden or 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
# Gets all Route53 DNS records for the requested Zone | |
Function Get-R53ResourceRecordList | |
{ | |
[CmdletBinding()] | |
param | |
( | |
[ValidateScript( | |
{ | |
$_ -like "*." |