Skip to content

Instantly share code, notes, and snippets.

View dmurvihill's full-sized avatar

Dolan Murvihill dmurvihill

  • Portland, OR
View GitHub Profile
@pmarreck
pmarreck / randompass.js
Created July 5, 2023 20:06
Generate a random password or randomized multiple-word dictionary password using Javascript (NO other dependencies!)
const CHARSET_LOWER = "abcdefghijklmnopqrstuvwxyz";
const CHARSET_UPPER = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const CHARSET_NUM = "0123456789";
const CHARSET_ALPHA = CHARSET_LOWER + CHARSET_UPPER;
const CHARSET_ALNUM = CHARSET_ALPHA + CHARSET_NUM;
const CHARSET_ALNUM_SANE = CHARSET_ALNUM.replace(/O|l|I/g, "");
// const CHARSET_PUNC = "!@#$%^&*-_=+[]{}|;:,.<>/?~";
// I shortened the possible punctuation chars due to incompatibility with various sites:
const CHARSET_PUNC = "!@#$%^&*";
const CHARSET_HEX = CHARSET_NUM + "abcdef";
@danpetitt
danpetitt / esmodules.md
Last active August 20, 2025 08:04
Typescript, Jest and ECMAScript Modules

Typescript, Jest and ECMAScript Modules (ESM)

Package.json

Add the type property to package.json to ensure modules are supported:

{
  "type": "module",
}