Skip to content

Instantly share code, notes, and snippets.

import React from 'react';
import throttle from 'lodash/throttle';
let io;
let isInstantiated = false;
const listeners = new WeakMap();
const animationQueue = new Set([]);
const rootMargin = 100;
let pageYOffset = null;
@cwgw
cwgw / pen-tile.svg
Last active September 6, 2019 20:06
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/**
* proof of concept replacement for gatsby-remark-images
* to be used with gatsby-plugin-mdx
*
* this is mostly a copy/paste/edit from gatsby-remark-images
*/
const visitWithParents = require(`unist-util-visit-parents`);
const getDefinitions = require(`mdast-util-definitions`);
const path = require(`path`);
@cwgw
cwgw / MetatronsCube.jsx
Last active June 6, 2023 22:30
A simple script for Adobe Illustrator CC that draws Metatron's Cube to your active artboard.
/**
* Title: Metatron's Cube
* Author: Charlie Wright
*
* A simple script for Adobe Illustrator CC that draws Metatron's Cube to your active artboard.
* To use, select File > Scripts > Other Script... then navigate to and open this file.
*
* For Illustrator scripting reference, see the official documentation at:
* https://www.adobe.com/devnet/illustrator/scripting.html
*/