Skip to content

Instantly share code, notes, and snippets.

View mickelsonm's full-sized avatar

Matt Mickelson mickelsonm

  • USA
View GitHub Profile
@voxxit
voxxit / USING-VAULT.md
Last active July 7, 2022 03:02
Consul + Vault + MySQL = <3
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200

Initializing a vault:

vault init
@nolanlawson
nolanlawson / protips.js
Last active February 4, 2024 18:06
Promise protips - stuff I wish I had known when I started with Promises
// Promise.all is good for executing many promises at once
Promise.all([
promise1,
promise2
]);
// Promise.resolve is good for wrapping synchronous code
Promise.resolve().then(function () {
if (somethingIsNotRight()) {
throw new Error("I will be rejected asynchronously!");
@smreed
smreed / nsqadmin-service.json
Last active August 29, 2015 14:10 — forked from bketelsen/nsqadmin-service.json
This gist represents all the manifests you'll need to run a redundant and fault-tolerant NSQ cluster on Kubernetes. NSQ Admin's http interface is available on port 14171 on any node. There's an issue with NSQ Admin if you're running more than one lookupd service, so I recommend running just one lookupd until I figure it out.
{
"id": "nsqadmin-http",
"kind": "Service",
"apiVersion": "v1beta1",
"containerPort": 4171,
"port": 14171,
"protocol": "TCP",
"selector": { "name": "nsqadmin" },
"createExternalLoadBalancer": true
}
@varver
varver / cookie_jar_golang.go
Last active June 7, 2022 13:04
Login to a website with this golang code using persistent cookies or cookie jar .