Skip to content

Instantly share code, notes, and snippets.

View maximilliangeorge's full-sized avatar

Maximillian George maximilliangeorge

  • Will and Max
  • Stockholm
View GitHub Profile
@maximilliangeorge
maximilliangeorge / sizing.scss
Last active May 15, 2025 07:35
SCSS size interpolation
// strip unit utility function
@function strip-unit($n) {
@return math.div($n, ($n * 0 + 1));
}
/**
* @function scale-between
* interpolates the size of an element based on the size of the screen
*
@maximilliangeorge
maximilliangeorge / index.js
Last active July 8, 2023 04:14
How to use npx to run gist based scripts
#!/usr/bin/env node
console.log("I was executed from a gist inside the terminal with npx!");
@maximilliangeorge
maximilliangeorge / index.js
Last active July 8, 2023 04:04 — forked from Tynael/README.md
How to use npx to run gist based scripts
#!/usr/bin/env node
console.log("I was executed from a gist inside the terminal with npx!");
@maximilliangeorge
maximilliangeorge / scrollPipe.js
Last active January 8, 2026 16:16
Utility to scroll through a website for demonstration purposes
// Cubic Bezier utility (from CSS spec)
function cubicBezier(p1x, p1y, p2x, p2y) {
const cx = 3 * p1x
const bx = 3 * (p2x - p1x) - cx
const ax = 1 - cx - bx
const cy = 3 * p1y
const by = 3 * (p2y - p1y) - cy
const ay = 1 - cy - by