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;
}| import bpy | |
| import random | |
| import math | |
| # random seed | |
| seed = random.randint(0, 99999); | |
| def main(): |
| # Author: Berin | |
| # Sketches repo: https://github.com/berinhard/sketches | |
| from collections import namedtuple | |
| from abc import ABCMeta, abstractmethod | |
| WHITE = color(235, 235, 235) | |
| BLACK = color(27, 27, 27) | |
| BLUE = color(55,189,182) | |
| def setup(): |
| // code updates are now there: | |
| // https://github.com/Bleuje/processing-animations-code/blob/main/code/radialcollapse/radialcollapse.pde | |
| // Processing code by Etienne JACOB | |
| // motion blur template by beesandbombs | |
| // opensimplexnoise code in another tab is be necessary | |
| // --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e | |
| // See the license information at the end of this file. | |
| // View the rendered result at: https://bleuje.com/gifanimationsite/single/radialcollapse/ |
| ''' Read and parse SVG files returning a shapely GeometryCollection containing the paths and primitives found. | |
| Transforms are applied and all shapes are returned in the SVG root elements coordinate space. Primitives (rect, | |
| circle and ellipse) are converted to equivalent paths, and only shape outlines are rendered, stroke properties | |
| have no affect and are discarded. | |
| Curved paths (arc and bezier commands and rounded rect, ellipse and circle elements) are linearized using a | |
| naive approach that attempts to create enough segments to reduce maximum distance to the curve to below a | |
| certain threshold, although this is probably not very efficient and most likely implemented in a fairly | |
| broken way.''' |
This tutorial was originally written by Jannie Theunissen on onesheep.org. However, the website has been down for a while and this a clone from the web.archive.org backup. Also, the parts regarding the macOS are updated according to this post. You may find OneSheep here on Twitter and Jannie Theunissen here on StackOverflow. If you have any comments on this Gist please poke me here on Twitter, otherwise, I might miss your comments.
We were recently asked to automate some editing tasks for the Spotlight English editors w
| Array.from(document.querySelectorAll('[id]')).forEach(e => { | |
| const a = document.createElement('a'); | |
| a.href=`#${e.id}`; | |
| e.parentNode.replaceChild(a, e); | |
| a.appendChild(e); | |
| }); |
| function iFrameFix(aId, divId) { | |
| const $a = document.getElementById(aId); | |
| const $div = document.getElementById(divId); | |
| const renderIframe = (img = {}) => { | |
| const w = img.naturalWidth || 100; | |
| const h = img.naturalHeight || 100; | |
| $div.innerHTML = `<iframe src="${a.href}" frameborder=0 width="${w}" height="${h}"></iframe>`; | |
| }; | |
| if ($a !== null && $div !== null) { | |
| let img = div.querySelector("img"); |