Skip to content

Instantly share code, notes, and snippets.

View joyrexus's full-sized avatar

J. Voigt joyrexus

View GitHub Profile
@joyrexus
joyrexus / reference.md
Last active March 30, 2023 19:40
a quick overview of key services
@joyrexus
joyrexus / index.js
Last active November 9, 2022 18:29
demo parser/chunker
const fs = require("fs");
const axios = require("axios");
const { parse } = require("csv-parse");
const Renderer = require("squirrelly");
class Template {
constructor(template) {
this.template = template;
}
@joyrexus
joyrexus / lambda-concurrency-to-cloudwatch.py
Created August 11, 2018 02:08 — forked from innovia/lambda-concurrency-to-cloudwatch.py
Lambda concurrent execution custom metric on CloudWatch
#!/usr/bin/env python
import boto3
import datetime
import time
ENABLED_REGIONS = [
"us-east-1",
"us-west-2",
"eu-west-1",
"eu-central-1",
@joyrexus
joyrexus / chunk_encode.py
Last active February 2, 2019 21:57
demo of a chunking json encoder
import json
import itertools
import StringIO
iterencode = json.JSONEncoder().iterencode
class SerializableList(list):
"""
@joyrexus
joyrexus / durham.md
Created October 24, 2017 00:59
durham favs
@joyrexus
joyrexus / README.md
Last active March 18, 2024 11:03
local webhook testing

We can test webhook callbacks with a little http server and a localtunnel.

Run server.js to spin up a local http server on port 8080. It just exposes a top-level route and will print the received header and payload of any request. Then create a localtunnel to have a non-local url that proxies all requests to localhost:8080.


First, install dependencies with npm install.

Then start the express server with npm start.

@joyrexus
joyrexus / mocha-guide-to-testing.js
Last active October 6, 2017 02:33 — forked from samwize/mocha-guide-to-testing.js
quick overview of mocha testing
// # Mocha Guide to Testing
// Objective is to explain describe(), it(), and before()/etc hooks
// 1. `describe()` is merely for grouping, which you can nest as deep
// 2. `it()` is a test case
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run
// before/after first/each it() or describe().
//
// Which means, `before()` is run before first it()/describe()
@joyrexus
joyrexus / test.js
Last active September 17, 2017 23:10 — forked from ericelliott/fancy-without-features.js
just use tape
import test from 'tape';
const before = test;
const after = test;
// beforeEach/afterEach rely on shared state.
// That's a big anti-pattern for testing.
// It's also silly to run something before and after
// ever test -- many of your tests won't need it.
@joyrexus
joyrexus / make_hmac.py
Created September 14, 2017 15:26
make hmac cli
#!/usr/bin/python
'''
A little script for generating HMACs.
> ./make_hmac.py SECRET BODY
HMAC
For example ...
> ./make_hmac.py secret foo
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")