Skip to content

Instantly share code, notes, and snippets.

View Js-Brecht's full-sized avatar

Jeremy Albright Js-Brecht

  • Anchorage, Alaska
View GitHub Profile
@Js-Brecht
Js-Brecht / jest.config.js
Last active August 9, 2019 23:37
Pulling @craco/craco merged config for jest
const path = require('path');
const reactScriptsPath = path.resolve(path.join('node_modules', 'react-scripts'));
const craPaths = require('react-scripts/config/paths');
const { overrideJest } = require("@craco/craco/lib/features/test/jest");
const { loadCracoConfig } = require("@craco/craco/lib/config");
const { getCraPaths } = require("@craco/craco/lib/cra");
const { removeJestConflictingCustomArgs } = require("@craco/craco/lib/args");
const context = {
@Js-Brecht
Js-Brecht / readline-interface.js
Created November 6, 2019 16:33
A simple readline interface for displaying prompts in a terminal. Uses flow, instead of typescript
/* @flow */
const readline = require(`readline`)
const MuteStream = require(`mute-stream`)
type ReadlineOptions = {
historySize: ?number,
prompt: ?string,
crlfDelay: ?number,
removeHistoryDuplicates: ?boolean,
escapeCodeTimeout: ?number,
@Js-Brecht
Js-Brecht / encryptionHandler.ts
Last active May 3, 2023 06:07
Encryption handler using Node's Cipheriv and Decipheriv
import * as crypto from "crypto";
const ALG_NAME = "aes-256-gcm";
const ALG_SIZES = {
NONCE: 16,
TAG: 16,
KEY: 16,
};
const PBKDF2 = {
NAME: "sha256",
@Js-Brecht
Js-Brecht / gatsby-link.js
Last active April 19, 2020 10:46
Internal/External Gatsby Link
@Js-Brecht
Js-Brecht / keybase.md
Created December 27, 2022 19:27
Keybase

Keybase proof

I hereby claim:

  • I am js-brecht on github.
  • I am jsbrecht (https://keybase.io/jsbrecht) on keybase.
  • I have a public key ASAasJwfePJ6d7LkqeFY5QbwKtM5ROBbYn-gh0ZdOmoz2wo

To claim this, I am signing this object: