Skip to content

Instantly share code, notes, and snippets.

View jcreamer898's full-sized avatar
🏠
Working from home

Jonathan Creamer jcreamer898

🏠
Working from home
View GitHub Profile

Subscaler

An opinionated suite of patterns, tools, and practices to help sublinearly scale your engineering systems.

Sublinearly scaling a repository requires thinking differently. There's often no "one size fits all" solution to how to scale. Instead there's a set of principles, and ideas that all culminate in an ecosystem and a culture of thinking which lends itself to easily growing without the confines of some overarching, and limitng tool.

Principles

Do one thing, and one thing well.

@jcreamer898
jcreamer898 / getMonorepoRoot.js
Created May 16, 2023 20:03
A simple way to get the path to the root package.json in a monorepo.
const getRootPackageJsonRecursively = async () => {
let currentDir = __dirname;
let packageJson;
let nextDir = "";
while (currentDir) {
try {
packageJson = await fs.readFile(
path.join(currentDir, "package.json"),
"utf8"
import path from "path";
import findRoot from "find-root";
import chalk from "chalk";
import type { Compiler, Plugin, compilation } from "webpack";
interface PluginOptions {
verbose?: boolean;
showHelp?: boolean;
emitError?: boolean;
exclude?: string[] | undefined | null;
@jcreamer898
jcreamer898 / adr.md
Created November 10, 2022 18:24
Templates for RFCs and ADRs used at Microsoft in the 1JS Engineering System.

TITLE

Date: YYYY-MM-DD

Status

PROPOSED | ACCEPTED | DEPRECATED

Context

set-option -g mouse on
setw -g mode-keys vi
set -g history-limit 20000
#bind P paste-buffer
#bind-key -T copy-mode-vi v send-keys -X begin-selection
#bind-key -T copy-mode-vi y send-keys -X rectangle-toggle
#unbind -T copy-mode-vi Enter
#bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
#bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'xclip -se c -i'
@jcreamer898
jcreamer898 / get-toc.js
Created January 12, 2022 22:10
Creates a JSON structure to generate a toc.yml file
const fs = require("fs");
const path = require("fs");
/**
*
* @param {string} item
*/
const cleanName = (item) => {
return item.replace(/\s/g, "-");
};

Type 'from' in the editor and...

What even is TypeScript?

JavaScript + Types = Typescript

TypeScript as a compilter

npm i -g typescript

./node_modules/.bin/tsc

#!/bin/sh
set -e
POSITIONAL=()
while [[ $# -gt 0 ]]
do
key="$1"
case $key in