This Web Components keeps the year in your copyright notice up-to-date.
export { CopyrightYearElement }
const name = "copyright-year";
class CopyrightYearElement extends HTMLSpanElement {
// sh.mjs: javascript shorthand | |
// array helpers (apl/j/k) | |
export const id=x=>x | |
export const af=(n,x)=>Array(n).fill(x) // TODO: make this 'afl' or 'fil' (aa?) | |
export const ii=(n,f)=>{for(let i=0;i<n;i++)f(i)} | |
export const im=(n,f)=>af(n,0).map((_,i)=>f(i)) | |
export const ia=(n,f)=>im(n,id) | |
export const at=(a,ixs)=>ixs.map(i=>a[i]) | |
export const io=(xs,ys)=>ys.map([].indexOf.bind(xs)) |
This guide was adapted from https://gist.github.com/niw/e4313b9c14e968764a52375da41b4278#running-ubuntu-server-for-arm64
Hey Apple users:
If you're now experiencing hangs launching apps on the Mac, I figured out the problem using Little Snitch.
It's trustd connecting to http://ocsp.apple.com >
Rank | Type | Prefix/Suffix | Length | |
---|---|---|---|---|
1 | Prefix | my+ | 2 | |
2 | Suffix | +online | 6 | |
3 | Prefix | the+ | 3 | |
4 | Suffix | +web | 3 | |
5 | Suffix | +media | 5 | |
6 | Prefix | web+ | 3 | |
7 | Suffix | +world | 5 | |
8 | Suffix | +net | 3 | |
9 | Prefix | go+ | 2 |
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
import { useEffect, useState } from "react" | |
import { createBrowserHistory } from "history" | |
const history = createBrowserHistory() | |
const toLocation = path => new URL(path, window.location.href) | |
// without this react won't re-render as location is the same object | |
// @see https://reactjs.org/docs/hooks-reference.html#bailing-out-of-a-state-update | |
const cloneLocation = () => Object.assign({}, window.location) |
[Input-SDL-Control1] | |
# Mupen64Plus SDL Input Plugin config parameter version number. Please don't change this version number. | |
version = 2 | |
# Controller configuration mode: 0=Fully Manual, 1=Auto with named SDL Device, 2=Fully automatic | |
mode = 0 | |
# Specifies which joystick is bound to this controller: -1=No joystick, 0 or more= SDL Joystick number | |
device = 0 | |
# SDL joystick name (or Keyboard) | |
name = "DragonRise Inc. Generic USB Joystick " |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.