Terraform version implementing: https://awsteele.com/blog/2021/09/15/aws-federation-comes-to-github-actions.html
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
kill -STOP "${PID}" | |
kill -CONT "${PID}" |
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 re | |
import glob | |
def main(): | |
outputFile = 'output.tsv' | |
files = glob.glob('*.html') | |
print "Extracting from %s files" %(len(files)) | |
data = [] |
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 hmac | |
import hashlib | |
def equal_hash(event): | |
secret_value = "secret-value-put-in-github-webhook-ui" | |
sigExpected = str(event["headers"]["X-Hub-Signature"].replace("sha1=", "")) | |
sigCalculated = str(hmac.new(secret_value, event["body"], hashlib.sha1).hexdigest()) | |
return hmac.compare_digest(sigCalculated, sigExpected) |
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
const Benchmark = require('benchmark'); | |
suite | |
.add('test1', function() { | |
console.log('stuff'); | |
}) | |
.add('test2', function() { | |
console.log('stuff'); | |
}) | |
.on('cycle', function(event) { |
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
// https://godoc.org/github.com/pkg/errors#Frame.Format | |
package main | |
import ( | |
"fmt" | |
"github.com/pkg/errors" | |
) |
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 numpy as np | |
import matplotlib.pyplot as plt | |
t = np.linspace(0,30,100) | |
y = np.random.random(100) | |
# Note: polynomialOrder too large will yeild warning: RankWarning: Polyfit may be poorly conditioned | |
# Note: depends on the signal you're fitting. A sine wave has no problem with order = 200 | |
# Note: but this random data doesn't fit right with order > 18 (you can see it by eye) | |
polynomialOrder = 10 |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os/exec" | |
"errors" | |
"strings" | |
log "github.com/sirupsen/logrus" |
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
# The first one in that file is the actual cert of the website | |
# The following ones in that file is the chain. Possibly this should separate full-chain.pem to chain.pem + cert.pem | |
openssl s_client -host www.google.com -port 443 -showcerts 2>&1 | sed -n '/BEGIN CERTIFICATE/,/END CERTIFICATE/p' > ~/Desktop/full-chain.pem |
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
THIS GIST IS DEPRECATED. USE THIS INSTEAD: | |
https://github.com/rms1000watt/new-computer |