-
Lutra Lutra
<span class="name">Lutra lutra</span>
Source: NBN Atlas -
Bombus ruderarius
<em>Bombus ruderarius</em>
Source: Biological Records Centre
This file contains 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
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
This file contains 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
customElements.define( | |
"i-frame", | |
class extends HTMLElement { | |
#shadow = this.attachShadow({ mode: "closed" }); | |
constructor() { | |
super(); | |
this.#shadow.innerHTML = ` | |
<slot></slot> | |
<iframe part="frame" srcdoc=""></iframe> |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Code Sandbox</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
body { |
This file contains 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
(function (win, doc) { | |
'use strict'; | |
if (!doc.querySelectorAll || !win.Intl || !win.Intl.RelativeTimeFormat) { | |
// doesn't cut the mustard. | |
return; | |
} | |
var rtf = new Intl.RelativeTimeFormat('en', { | |
localeMatcher: 'best fit', | |
numeric: 'always', | |
style: 'long' |
This file contains 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
import { UserConfig } from "@11ty/eleventy"; | |
import { DOMParser } from "@xmldom/xmldom"; | |
import { transform } from "esbuild"; | |
import { minify } from "html-minifier"; | |
/** cache for content of script tags with an ID */ | |
const scriptCache = new Map<string, string>(); | |
/** DOM parser for navigating the rendered document; warnings are ignored */ | |
const parser = new DOMParser({ errorHandler: { warning: () => {} } }); |
This file contains 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
<?php | |
/** | |
* | |
* @link https://www.spacedmonkey.co.uk | |
* @since 1.0.0 | |
* @package Style_Splitter | |
* | |
* @wordpress-plugin | |
* Plugin Name: Block style splitter |
This file contains 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
<?php | |
/** | |
* Locomotive Bedrock Valet Driver | |
* | |
* Supported Valet Version: 4 | |
*/ | |
namespace Valet\Drivers\Custom; |
This file contains 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
<?php | |
/** | |
* Thinking through a possible implementation for wrapping native WordPress hooks with my own. | |
*/ | |
declare( strict_types=1 ); | |
namespace JMichaelWard\PluginConcept; | |
/** |
NewerOlder