// Leaflet JS - note the *className* attribute
// [...]
L.tileLayer('https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
className: 'map-tiles'
}).addTo(map);
// [...]
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
| /*** The new CSS Reset - version 1.2.0 (last updated 23.7.2021) ***/ | |
| /* Remove all the styles of the "User-Agent-Stylesheet", except for the 'display' property */ | |
| *:where(:not(iframe, canvas, img, svg, video):not(svg *)) { | |
| all: unset; | |
| display: revert; | |
| } | |
| /* Preferred box-sizing value */ | |
| *, |
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
| /* | |
| Web component code gen from Gemini Pro | |
| Original code: https://codepen.io/cassidoo/pen/RNrqOOO | |
| Related social media post: https://bsky.app/profile/did:plc:bhdap3w2bseikypfnjmaskzf/post/3m4pb4lz6ss24 | |
| */ | |
| class RevealImage extends HTMLElement { | |
| // --- Define default values --- | |
| radius = 100; | |
| bigRadius = 200; |
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
| // Open a supplied HTML file and record whatever's going on to an MP4. | |
| // | |
| // Usage: node recorder.cjs <path_to_html_file> | |
| // Dependencies: npm install puppeteer fluent-ffmpeg | |
| // (and yes, you need ffmpeg installed) | |
| // | |
| // It expects a <canvas> element to be on the page as it waits for | |
| // that to load in first, but you can edit the code below if you | |
| // don't want that. | |
| // |
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
| git log --pretty=format:"%h%x09%an%x09%ad%x09%s" |
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
| var now, dt, | |
| rate = 0.5, | |
| last = performance.now(); | |
| function frame() { | |
| now = performance.now(); | |
| dt = (now - last) / 1000; // duration in seconds | |
| if(dt >= rate){ | |
| console.log("bing") | |
| last = now; |
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
| var angle = null, | |
| step = 20, | |
| rate = 90; | |
| draw = () => { | |
| if (!angle) { | |
| angle = 0; | |
| } | |
| console.clear(); |
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
| //TODO: add cursor bg and rotate script. can't tell what's happening without visual | |
| let lastCoords = []; | |
| const handleDir = e => { | |
| let xDiff, yDiff, currCoords = [e.x, e.y]; | |
| if ( lastCoords.length !== 0 ){ | |
| xDiff = currCoords[0] - lastCoords[0]; | |
| yDiff = currCoords[1] - lastCoords[1]; | |
| } |
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
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/reset-css@5.0.1/reset.min.css"> | |
| <script type="module"> | |
| import * as THREE from "https://cdn.jsdelivr.net/npm/three@0.124.0/build/three.module.js" | |
| import { OrbitControls } from "https://cdn.jsdelivr.net/npm/three@0.124.0/examples/jsm/controls/OrbitControls.js" | |
| var scene = new THREE.Scene() | |
| var camera = new THREE.PerspectiveCamera(75) | |
| camera.position.z = 4 |
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
| (() => {return Function(`"use strict";return (${__f__})`)();}).call(null)() | |
| // would normally do `eval(__f__)` where __f__ might be a stringified function | |
| // name in an array |
NewerOlder