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
| const fetch = require("node-fetch"); | |
| function baseRequest(url, options) { | |
| return fetch(`https://api.cloudflare.com/client/v4/${url}`, { | |
| headers: { | |
| Authorization: "Bearer YOUR_TOKEN_HERE", | |
| }, | |
| ...options, | |
| }); | |
| } |
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://www.myersdaily.org/joseph/javascript/md5-text.html | |
| */ | |
| (function (global) { | |
| var md5cycle = function (x, k) { | |
| var a = x[0], | |
| b = x[1], | |
| c = x[2], | |
| d = x[3]; |
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
| # for *pert functons | |
| library('mc2d') | |
| # given the number of loss events, calculate the sum of losses for the number of events | |
| sample_LM <- function(N, L, ML, H, CONF){ | |
| # Calculate the aggregate loss | |
| # | |
| # ARGS: | |
| # N - number of threat events to evaluate | |
| # L - low boundary |
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
| # for *pert functons | |
| library('mc2d') | |
| # given the number of loss events, calculate the sum of losses for the number of events | |
| sample_LM <- function(N, L, ML, H, CONF){ | |
| # Calculate the aggregate loss | |
| # | |
| # ARGS: | |
| # N - number of threat events to evaluate | |
| # L - low boundary |
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
| Machine({ | |
| id: 'SWAPI', | |
| initial: 'idle', | |
| context: { | |
| user: null | |
| }, | |
| states: { | |
| idle: { | |
| on: { | |
| FETCH: 'loading' |
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
| export class MyEcsConstructStack extends cdk.Stack { | |
| constructor(scope: cdk.App, id: string, props?: cdk.StackProps) { | |
| super(scope, id, props); | |
| const vpc = new ec2.VpcNetwork(this, 'MyVpc', { | |
| maxAZs: 3 // Default is all AZs in region | |
| }); | |
| const cluster = new ecs.Cluster(this, 'MyCluster', { | |
| vpc: vpc |
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
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "flag" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| ) |
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
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "flag" | |
| "io" | |
| "io/ioutil" | |
| "log" | |
| "os" |