Skip to content

Instantly share code, notes, and snippets.

View genu's full-sized avatar

Eugen Istoc genu

View GitHub Profile
@genu
genu / Gradient.js
Last active January 1, 2023 22:28 — forked from jordienr/Gradient.js
Stripe Mesh Gradient WebGL
/*
* 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
*/
@genu
genu / array_flatten.js
Created October 20, 2016 05:11
Function to flatten an array
/**
* Recursivelly flattens an array
*
* @param {Array} input The input array
* @return {Array|Number} Flattened array or -1 if the input is invalid
*/
function flatten (input) {
if(!Array.isArray(input)) {
return -1;
}
@genu
genu / 0_reuse_code.js
Created April 3, 2014 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console