Skip to content

Instantly share code, notes, and snippets.

View zslabs's full-sized avatar

Zach Schnackel zslabs

View GitHub Profile
@jacob-ebey
jacob-ebey / image.ts
Last active September 18, 2024 19:12
Remix Image Component
import { createHash } from "crypto";
import fs from "fs";
import fsp from "fs/promises";
import path from "path";
import https from "https";
import { PassThrough } from "stream";
import type { Readable } from "stream";
import type { LoaderFunction } from "remix";
import sharp from "sharp";
import type { Request as NodeRequest } from "@remix-run/node";
@paulozoom
paulozoom / _gradient-color-at.scss
Created April 9, 2015 15:43
Sass function to calculate the color of a linear gradient at a specific point
///
/// Calculates the color of a linear gradient at a specific point.
///
/// @param {Color} $start - gradient’s start color
/// @param {Color} $end - gradient’s end color
/// @param {Number} $point - point of the gradient (between 0 and 1, or 0% and 100%) at which we want the color
/// @return {Color}
///
/// @example scss
/// background-color: gradient-color-at(#BBE087, #DCDE85, 0.4);