Goals of this plan:
- Eliminate interruptions to an in-progress release
- Move towards a trunk based continuous delivery model (https://trunkbaseddevelopment.com/)
- Avoid disruption to engineers
// Adapted from benchmark described in this article https://medium.com/deno-the-complete-reference/node-js-vs-java-how-faster-is-bytecode-compared-to-interpreted-code-for-jwt-sign-verify-910caa55a7f2 | |
// Moves the SHA Key outside of the loop, Brings performance down to ~7 seconds on M3 Macbook Air 24GB RAM | |
import jwt from "jsonwebtoken"; | |
import { readFileSync } from "node:fs"; | |
import { KeyObject } from "node:crypto"; | |
const emails = JSON.parse(readFileSync("./emails.json")); | |
let i = 1, | |
idx = 0; |
Goals of this plan:
Instructions up to date as of March 2022. Assumes homebrew and git are installed on your machine.
brew install pinentry-mac
brew install gnupg
interface Pipe<T> { | |
val: T; | |
into<U>(cb: (val: T) => U): Pipe<U>; | |
} | |
function pipe<T>(val: T): Pipe<T> { | |
return { val, into: cb => pipe(cb(val)) } | |
} | |
// // Example Usage |
var compileAtts = function(atts, node) { | |
for (var prop in atts) { | |
var att = document.createAttribute(prop); | |
att.value = atts[prop].toString(); | |
node.setAttributeNode(att); | |
} | |
}; | |
var compileElement = function(tagName, args) { | |
var atts = args[0] instanceof Object ? args.shift() : false; |
/** | |
* Ajax helper, returns a promise. Assumes both request and response are json. | |
*/ | |
function ajax(type, url, data) { | |
return new Promise(function (resolve, reject) { | |
var req = new XMLHttpRequest(); | |
req.onload = function () { | |
if (req.status >= 200 && req.status < 400) { | |
resolve(JSON.parse(req.responseText)); | |
} else { |