Skip to content

Instantly share code, notes, and snippets.

View nberlette's full-sized avatar
🧱
rusting away

Nick Berlette nberlette

🧱
rusting away
View GitHub Profile
@nberlette
nberlette / domain_hacks.ts
Last active December 1, 2025 04:17
dictionary-based bulk domain hack generator CLI
#!/usr/bin/env -S deno run -Aq --unstable-kv
//! Domain Hack Generator and Availability Checker
//! -----------------------------------------------------------------------
//! Copyright (c) 2025 Nicholas Berlette. All rights reserved. MIT License.
//! -----------------------------------------------------------------------
// deno-lint-ignore-file no-explicit-any
/**
@nberlette
nberlette / pre-commit
Last active November 1, 2025 18:54
pre-commit hook to lint + fmt staged files with deno
#!/usr/bin/env bash
# pre-commit - deno fmt + deno lint
# ---------------------------------------------------------------------
# Copyright (c) 2025 Nicholas Berlette. All rights reserved.
# Published under the MIT License (https://nick.mit-license.org).
# ---------------------------------------------------------------------
# Runs deno's formatter and linter on staged files before committing.
#
# Place this file in your .git/hooks/ directory to enable pre-commit checks.
@nberlette
nberlette / LICENSE
Last active November 11, 2025 06:17
another typescript runtime type library
MIT License
Copyright (c) 2024-2025+ Nicholas Berlette (https://github.com/nberlette). All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@nberlette
nberlette / settings.jsonc
Last active June 14, 2025 08:14
Nick's Copilot Instructions and Settings for VSCode
{
"files.watcherExclude": {
"**/.coverage/**": true,
"**/docs/**": true,
"**/target/**": true
},
"deno.enable": true,
"deno.lint": true,
"deno.codeLens.test": true,
"deno.cacheOnSave": true,
@nberlette
nberlette / ply.ts
Last active May 13, 2025 03:37
TypeScript port of the dabeaz/ply tool (python)
// deno-lint-ignore-file no-explicit-any
/**
* Logger interface for parser/lexer.
*/
export interface Logger {
debug(message: string, ...args: unknown[]): void;
info(message: string, ...args: unknown[]): void;
warning(message: string, ...args: unknown[]): void;
error(message: string, ...args: unknown[]): void;
@nberlette
nberlette / ANSI.md
Created May 7, 2025 21:45 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@nberlette
nberlette / readme.md
Last active April 25, 2025 22:42
alternate keyboard character set prank

Want to prank a friend?

Enter this code into their terminal and watch them go crazy trying to figure out what happened!

echo -e "\033(0"

What does it do?

@nberlette
nberlette / block_letters.ts
Last active April 23, 2025 02:39
TypeScript Block Letter Renderer (ASCII or Unicode)
/**
* This module provides a block letter rendering utility for text,
* capable of rendering arbitrary strings into multiple styles of
* block letters using either ASCII characters or Unicode blocks.
*
* It's perfect for creating stylized text in console applications!
*
*
* @license MIT (https://nick.mit-license.org)
* @author Nicholas Berlette <https://github.com/nberlette>
@nberlette
nberlette / LICENSE
Last active April 17, 2025 07:02
Rc, Weak, Cell, OnceCell in TypeScript
The MIT License (MIT)
Copyright (c) 2025+ Nicholas Berlette (https://github.com/nberlette)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@nberlette
nberlette / LICENSE
Last active April 17, 2025 07:02
colorhash
The MIT License (MIT)
Copyright (c) 2023-2025+ Nicholas Berlette (https://github.com/nberlette)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions: