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
<# | |
References: | |
- https://docs.microsoft.com/en-us/dotnet/api/system.net.websockets.clientwebsocket?view=netframework-4.5 | |
- https://github.com/poshbotio/PoshBot/blob/master/PoshBot/Implementations/Slack/SlackConnection.ps1 | |
- https://www.leeholmes.com/blog/2018/09/05/producer-consumer-parallelism-in-powershell/ | |
#> | |
$client_id = [System.GUID]::NewGuid() | |
$recv_queue = New-Object 'System.Collections.Concurrent.ConcurrentQueue[String]' |
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
# From https://stackoverflow.com/questions/42636510/convert-multiple-xmls-to-json-list | |
# Use | |
# [xml]$var = Get-Content file.xml | |
# Convert to JSON with | |
# $var | ConvertFrom-XML | ConvertTo-JSON -Depth 3 | |
# Helper function that converts a *simple* XML document to a nested hashtable | |
# with ordered keys. | |
function ConvertFrom-Xml { | |
param([parameter(Mandatory, ValueFromPipeline)] [System.Xml.XmlNode] $node) |
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
function New-CPPortalSession ($key, $secret) { | |
$body = @{ | |
clientId = $key; | |
accessKey = $secret | |
} | ConvertTo-Json | |
try { | |
$res = Invoke-RestMethod -Uri "https://cloudinfra-gw.portal.checkpoint.com/auth/external" ` | |
-Headers @{"Content-Type" = "application/json" } ` |
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
#!/bin/sh | |
# usage: push-gh-pages DIRECTORY # DIRECTORY is where GitHub pages contents are in (eg. build) | |
# LICENSE: Public Domain | |
set -e | |
remote=$(git config remote.origin.url) | |
described_rev=$(git rev-parse HEAD | git name-rev --stdin) |
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
#!/bin/bash | |
MESSAGE="Message" | |
SLACK_CHANNEL="#slack-channel" | |
SLACK_TOKEN=xoxb-1234-000000000000 | |
curl -X POST \ | |
-H "Authorization: Bearer $SLACK_TOKEN" \ | |
-H "Content-type: application/json; charset=utf-8" \ | |
--data '{"channel":"'$SLACK_CHANNEL'","text":"'"$MESSAGE"'"}' \ |
https://www.elastic.co/guide/en/kibana/current/brew.html https://www.elastic.co/guide/en/elasticsearch/reference/current/brew.html
brew tap elastic/tap
brew install elastic/tap/elasticsearch-full
brew install elastic/tap/kibana-full
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
<# | |
.SYNOPSIS | |
Lists delegated permission grants (OAuth2PermissionGrants) and application permissions grants (AppRoleAssignments) granted to an app. | |
.PARAMETER ObjectId | |
The ObjectId of the ServicePrincipal object for the app in question. | |
.PARAMETER AppId | |
The AppId of the ServicePrincipal object for the app in question. |
- https://www.flowdock.com/app/rulemotion/r-resinos/threads/zv366eTa8wNZmC7IrUZB52JUwt7
- https://resinio.testlodge.com/projects/16238/runs/579754?tab=2#executed_case_23888354
- https://resinio.testlodge.com/projects/16238/suites/140935?expand_section=241935#case_2870775
- https://hub.docker.com/r/resin/resinos/tags?page=1&ordering=last_updated
- https://hub.docker.com/r/resin/resinos-staging/tags?page=1&ordering=last_updated