This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Stripe WebGl Gradient Animation | |
| * All Credits to Stripe.com | |
| * ScrollObserver functionality to disable animation when not scrolled into view has been disabled and | |
| * commented out for now. | |
| * https://kevinhufnagl.com | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env zx | |
| /** @type {import('zx/globals')} */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function diffArrayByKey<T, K1 extends keyof T, K2 extends T[K1]>( | |
| one: T[], | |
| key: K1, | |
| two: K2[] | |
| ) { | |
| if (!Array.isArray(two)) { | |
| return one.slice(); | |
| } | |
| const tlen = two.length; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // this file is just to set the name of the gist, use just one of the functions below | |
| export * as withLuxon from './withLuxon' | |
| export * as withMoment from './withMoment' | |
| export * as withDateFns from './withDateFns' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| arrayWithFalsyItems.filter(Boolean) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| useEffect(() => { | |
| // componentDidMount | |
| }, []) | |
| useEffect(() => { | |
| // componentDidUpdate | |
| }, [something, anotherThing]) | |
| useEffect(() => { | |
| return () => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| input_path=$1 | |
| output_path=$2 | |
| # Find all .env files in the input path | |
| for file in $(find "$input_path" -name "*.env"); do | |
| # Get the file path relative to the input path | |
| relative_path="${file#$input_path/}" |
