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
foo: | |
bar: | |
baz: something | |
anotherfoo: | |
secondbar: otherthing |
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
#!/usr/bin/python3 | |
# NOTE: If running on Ubuntu you need to install the "libmysqlclient-dev" package from apt and the "mysql" package through pip | |
# apt install libmysqlclient-dev | |
# pip3 install mysql | |
import MySQLdb | |
import time | |
NUM_ITERATIONS = 100 |
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
FROM python:3 | |
WORKDIR /usr/src/app | |
#COPY requirements.txt ./ | |
#RUN pip install --no-cache-dir -r requirements.txt | |
COPY . . | |
CMD [ "python", "./long_logger.py"] |
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
#!/bin/bash | |
sendToStream(){ | |
local EVENT_UUID=`uuidgen` | |
echo "Sending $1 event with shared ID $2" | |
AUTH="-u admin:changeit" | |
curl $AUTH -i -d "{\"type\":\"$1\", \"foo$1\":\"we did a $1 kind of thing.\",\"id\":\"$2\"}" "http://127.0.0.1:2113/streams/$1-$2" -H "Content-Type:application/json" -H "ES-EventType: $1-event" -H "ES-EventId: $EVENT_UUID" | |
echo "Curl return value $?" | |
} | |
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
<html> | |
<head> | |
<script type="text/javascript" src="webcrypto.js"></script> | |
<title>Web Crypto Hello World</title> | |
</head> | |
<body> | |
<p>This is a super simple example of trying to get Web Cryptography working</p> | |
</body> | |
</html> |
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
#!/bin/bash | |
# Usage: ./get_k8s_secret_plaintext SECRET_NAME SECRET_KEY | |
kubectl get secret $1 -o json | jq -r '.data[$2]' | base64 --decode |
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
#!/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 | |
####!/usr/bin/python3 | |
import os | |
import yaml | |
class APIGW(): | |
def __init__(self, responses, passThroughBehavior, requestTemplates, | |
gwType): |
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
swagger: "2.0" | |
info: | |
description: "This is a blog API defined in swagger" | |
version: "1.0.0" | |
title: "Swagger blog API" | |
termsOfService: "http://blog.dukic.co.nz/terms" | |
contact: | |
email: "[email protected]" | |
license: | |
name: "AGPL 3.0" |
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
<html> | |
<head> | |
<title>Testing XHR</title> | |
</head> | |
<body> | |
<p>This is a test</p> | |
<br /> | |
<div id="foobar"></div> | |
<script> | |
// Create the HTTP request |
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
#!/bin/groovy | |
// NOTE: The jar "activemq-all-5.15.8.jar" needs to be put under $HOME/.groovy/lib | |
// for this script to work | |
import javax.jms.* | |
import org.apache.activemq.* | |
def amqURL = "failover:tcp://localhost:61616" | |
println "Connecting to ActiveMQ at URL " + amqURL |