Skip to content

Instantly share code, notes, and snippets.

@herrernst
herrernst / checkerboard.html
Last active July 5, 2023 20:49
examples to test macOS scaling artifacts
<!doctype html>
<style>
:root {
background-color: white;
background-image:
linear-gradient(45deg, #000 25%, transparent 25%),
linear-gradient(-45deg, #000 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, #000 75%),
linear-gradient(-45deg, transparent 75%, #000 75%);
background-size:2px 2px;
@herrernst
herrernst / raf.html
Last active August 11, 2023 10:00
requestAnimationFrame fps loop
<!doctype html>
<meta name="viewport" content="width=device-width">
<style>
:root {
font-family: sans-serif;
background: black;
color: white;
}
#frameInfo, #timeInfo, #fps {
font-size: 5em;
@herrernst
herrernst / zoom-vs-fontsize.html
Last active February 13, 2025 13:00
Browser zoom vs font-size
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
:root {
font-family: sans-serif;
-webkit-text-size-adjust: 100%;
text-size-adjust: 100%; /* needed for chrome to not increase some text and some not (in flexbox) */
}
@herrernst
herrernst / is-direct-link-interface.c
Created March 26, 2025 16:39
Check if a macOS network interface is a "direct link" interface (what is used for iOS device debugging over USB)