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
import base64 | |
import json | |
import hmac | |
import hashlib | |
encoding = "utf-8" | |
secret = "<API_KEY_SHARED_SECRET>".encode(encoding) | |
iat = 1600116847 | |
exp = 1600203247 | |
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
var jsonData = pm.response.json(); | |
pm.environment.set("jwt", jsonData.access_token); | |
function parseJwt (token,part) { | |
var base64Url = token.split('.')[part]; | |
var words = CryptoJS.enc.Base64.parse(base64Url); | |
var jsonPayload = CryptoJS.enc.Utf8.stringify(words); | |
return JSON.parse(jsonPayload); | |
}; |
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
var https = require('https'); | |
var util = require('util'); | |
exports.handler = function (event, context) { | |
console.log(JSON.stringify(event, null, 2)); | |
console.log('From SNS:', event.Records[0].Sns.Message); | |
var severity = "good"; | |
var message = event.Records[0].Sns.Message; | |
var messageJSON = JSON.parse(message); |
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
spool c:\temp\db.csv | |
select /*csv*/ * from v$database; | |
spool off |
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
POWERSHELL -c "[guid]::NewGuid().ToString().ToUpper()" | clip |
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
#Quick and dirty PS script for counting lines of code in a directory. Output is dumped to a simple CSV file. | |
#Note that this script doesn't count blank lines. | |
#Parameters: | |
# path - the path containing the code files (note that the script will recurse through subfolders | |
# outputFile - fully qualified path of the file to dump the CSV output | |
# include (Optional) - file mask(s) to include in the count (deafults to *.*) | |
# exclude (Optional) - file mask(s) to exclude in the count (defaults to none) | |
# Example (count lines in target path including *.cs but excluding *.designer.cs) | |
# .\find.ps1 -path "C:\Source" -outputFile "C:\Temp\out.csv" -include "*.js" -find "LocalStorage" | |
param([string]$path, [string]$outputFile, [string]$include = "*.*", [string]$exclude = "", [string]$find = "") |