Skip to content

Instantly share code, notes, and snippets.

View IsaiahByDayah's full-sized avatar

Isaiah Smith IsaiahByDayah

View GitHub Profile
export const chaosTestStrings = (): void => {
const textNodes = getAllTextNodes(document.body);
for (const node of textNodes) {
const textNodeLength = node.textContent ? node.textContent.length : 0;
if (node.textContent === null) {
return;
}
if (node.parentElement instanceof Element) {
if (node.parentElement.dataset.originalText === undefined) {
@IsaiahByDayah
IsaiahByDayah / resize.ts
Last active March 1, 2024 07:56
Example express endpoint that resizes an image from B2 Cloud Storage
import * as admin from "firebase-admin"
import express from "express"
import sharp, { ResizeOptions, OutputOptions } from "sharp"
import fetch from "cross-fetch"
import FileType from "file-type"
import { parseQueryNumber, parseQueryString } from "../some/extra/util/functions"
import { Photo } from "../some/custom/types"
const router = express.Router()
@max-barry
max-barry / function-dynamic-resize-complete.ts
Last active July 13, 2024 20:29
Dynamic Firestore Image Resizing Function > Complete #2
import * as path from "path";
import * as zlib from "zlib";
import { PassThrough } from "stream";
import * as functions from "firebase-functions";
import * as admin from "firebase-admin";
import * as log from "firebase-functions/lib/logger";
import * as sharp from "sharp";
import { empty } from "ramda";
@nijicha
nijicha / install_nodejs_and_yarn_homebrew.md
Last active June 20, 2024 13:06
Install NVM, Node.js, Yarn via Homebrew
@natelandau
natelandau / .bash_profile
Last active July 24, 2024 15:28
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management