a model or design used as a guide in needlework and other crafts
-- OED
A model or design: patterns are more abstract than the substrate you're applying them to. Software's pretty abstract already, but design patterns are
/** `x/crypto` if running in `deno` */ | |
import { createHmac } from 'node:crypto' | |
/** A signing secret */ | |
const HMAC_SECRET = '<YOUR SIGNING SECRET HERE>' | |
/** Length of a hexidecimal HMAC digest */ | |
const HMAC_LENGTH = 64 | |
function hmac(message: string): string { |
/** | |
* Represents an error when an unreachable variant is encountered at runtime | |
*/ | |
export class ExhaustiveCheckError<T> extends TypeError { | |
public instance: T; | |
public readonly isUnexpected = true; | |
constructor(msg: string, instance: T) { | |
super(msg); |
#!/bin/bash | |
# Brute force search for TypeScript files in the current directory that fail | |
# the `--strictNullChecks` flag. YMMV. | |
# edit this function to exclude files that _shouldn't_ be checked. | |
filter_defs() { | |
grep -v node_modules \ | |
| grep -v '.d.ts$' \ | |
| sort \ |
#! /bin/bash | |
# | |
# Translates an existing AWS Route53 zone into Terraform `aws_route53_record` resources. | |
# | |
# Released under the MIT license; YMMV. Tested on Linux with: | |
# | |
# - jq-1.6 | |
# - terraform v0.12.26 | |
# - aws-cli/1.17.14 | |
# |
#!/bin/bash | |
# Returns a list of strict null-checked files inside the current directory. | |
# Useful for gradually introducing the `--strictNullCheck` flag to a | |
# TypeScript project. | |
# | |
# See: https://code.visualstudio.com/blogs/2019/05/23/strict-null | |
TS_FLAGS='--strictNullChecks --outDir=/dev/null' |
#! /bin/bash | |
# | |
# Use `psutils` to convert a PDF into a printable booklet. | |
# | |
# Usage: | |
# | |
# $ ./pdf_to_booklet.sh my_file.pdf | |
# | |
# Distributed under terms of the MIT license. |
a model or design used as a guide in needlework and other crafts
-- OED
A model or design: patterns are more abstract than the substrate you're applying them to. Software's pretty abstract already, but design patterns are
Lightning talks from the @pdxreactjs meetup on 2019-02-12.
Daniel Lemay - @dslemay
PDXReactJS meetup / 13. Nov 2018 @benjamminj
We want to make complex problems simple, and solve them in ways we can extend on.
JavaScript v. ReasonML:
*.js |