Skip to content

Instantly share code, notes, and snippets.

View triptych's full-sized avatar
Making web things

Andrew Wooldridge triptych

Making web things
View GitHub Profile
triptych / npm.js
Created March 14, 2024 22:28 — forked from josdejong/npm.js
Helper function to load ESM packages from NPM in your browser dev tools console
* Load an ESM package from npm in your JavaScript environment.
* Loads packages from via the CDN
* Usage:
* const lodash = await npm('lodash-es')
* const lodash = await npm('lodash-es@4')
* const lodash = await npm('lodash-es@4.17.21')
triptych /
Created December 24, 2022 21:57 — forked from kentbrew/
Tootski, a sharing bookmarklet for Mastodon

Tootski, a sharing bookmarklet for Mastodon

Tootski is a bookmarklet that will share the page you're on to your Mastodon instance, including the title, address, and any text you may have selected.

Before You Begin

You need to know the name of your Mastodon instance if it's not To find it, visit your home page on Mastodon and copy out the part between the second and third slash. My home URL looks like this:

triptych /
Created September 26, 2022 06:08 — forked from JoeyBurzynski/
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
triptych / lit-element-in-browser.html
Created May 9, 2022 22:03 — forked from mcmoe/lit-element-in-browser.html
Using Lit Element without npm directly in the browser
<!-- From: -->
<!doctype html>
<!-- Polyfills only needed for Firefox and Edge. -->
<script src=""></script>
<!-- Works only on browsers that support Javascript modules like
Chrome, Safari, Firefox 60, Edge 17 -->
// Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible).
// Tweak the makePrettyJSON_ function to customize what kind of JSON to export.
var FORMAT_ONELINE = 'One-line';
var FORMAT_MULTILINE = 'Multi-line';
var FORMAT_PRETTY = 'Pretty';
var LANGUAGE_JS = 'JavaScript';
var LANGUAGE_PYTHON = 'Python';
triptych / app.js
Created September 26, 2020 21:53 — forked from JuanJo4/app.js
Twitter OAuth with node-oauth for node.js + express 4
Node.js, express, oauth example using Twitters API
Install Dependencies:
npm install express
npm install oauth
Create App File:
Save this file to app.js
Link to raytracing example at
Adapter from Yonaba's lua raytracer example,%0Aheight=10,%0A%7B1,0,0,0,1,1,1,1,1,1%7D,%0A%7B1,0,0,0,0,0,0,0,0,1%7D,%0A%7B1,0,0,0,0,0,0,0,0,1%7D,%0A%7B1,0,0,0,0,0,0,0,0,1%7D,%0A%7B1,0,0,0,0,0,0,0,0,1%7D,%0A%7B1,0,0,0,1,0,0,0,0,1%7D,%0A%7B1,1,0,0,1,1,0,0,0,1%7D,%0A%7B1,0,0,0,1,0,0,0,0,1%7D,%0A%7B1,1,0,0,1,1,0,0,0,1%7D,%0A%7B1,1,1,1,1,1,1,2,2,1%7D%0A%7D%0A%0Aposx=1%0Aposy=3%0Adirx=1%0Adiry=0%0Aplanex=0%0Aplaney=0.66%0Amove=.2%0Arotation=math.pi/2%0Adirection=1%0Ascreenx=160%0Ascreeny=160%0AcolorRoof=6%0AcolorSky=5%0AcolorStripes=10%0A%0A--3d%20loop%0Adelay(150)%0Afor%20i=1,24%20do%0Aclear()%0Ax=0%0Afor%20x=0,screenx%20do%0Acamx=2*x/screenx-1%0Arayposx=posx%0Arayposy=posy%0Araydirx=dirx+planex*camx%0Araydiry=diry+planey*camx%0Amapx=rayposx%0Amapy=rayposy%0Asidedistx=0%0Asidedisty=0%0Adeltadistx=math.sqrt(1+(raydiry*raydiry)/(raydirx*raydirx))%0Adeltadisty=math.sqrt(1+(raydirx*raydirx)/(raydiry*raydiry))%0Aperp=0%0Astepx=0%0Astepy=0%0Ahi
triptych /
Created August 23, 2020 07:34 — forked from justsml/
JavaScript Fetch API Examples
triptych / *
Created August 1, 2020 14:56 — forked from developit/*
🐻 Valoo: just the bare necessities of state management. 150b / 120b.

🐻 valoo

just the bare necessities of state management.


Hotlink it from

See Interactive Codepen Demo.