Skip to content

Instantly share code, notes, and snippets.

Nolan Lawson nolanlawson

Block or report user

Report or block nolanlawson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nolanlawson
nolanlawson / index.html
Last active Sep 14, 2019
textarea with pre mirror to autosize
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>resize textarea</title>
<style>
textarea.textarea, pre.mirror {
border: 1px solid gray;
margin: 0;
padding: 0;
@nolanlawson
nolanlawson / index.html
Created Sep 8, 2019
Test iOS file types
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test iOS audio input</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1>Test iOS audio input</h1>
@nolanlawson
nolanlawson / index.html
Last active Aug 26, 2019
Repro spinner rAF (no button)
View index.html
<!doctype html>
<html lang="">
<head>
<title>Repro spinner recalc on rAF (no button)</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="minimal.css">
</head>
<body>
<h1>Repro spinner recalc on rAF (no button)</h1>
<div class="slds-spinner_container">
@nolanlawson
nolanlawson / index.html
Last active Aug 23, 2019
Repro spinner rAF recalc issue
View index.html
<!doctype html>
<html lang="">
<head>
<title>Repro spinner recalc on rAF</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="minimal.css">
</head>
<body>
<h1>Repro spinner recalc on rAF</h1>
<button id="toggleButton"
@nolanlawson
nolanlawson / blurhash.js
Last active Aug 18, 2019
OffscreenCanvas demo
View blurhash.js
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.Blurhash = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var digitCharacters = [
"0",
"1",
"2",
"3",
"4",
"5",
@nolanlawson
nolanlawson / README.md
Last active Aug 8, 2019
Repro Chrome style recalc issue
View README.md

repro-recalc

Minimal repro for the Chrome style recalc issue.

@nolanlawson
nolanlawson / README.md
Last active Jun 19, 2019
Test chromedriver heap snapshot
View README.md

test-chromedriver

Usage

  1. Download chromedriver, extract the binary as chromedriver to the current directory
  2. Run pip install -r requirements.txt
  3. Run python test.py
  4. Try to load the snap.heapsnapshot file into Chrome Dev Tool's Memory tool (Memory -> Load)
@nolanlawson
nolanlawson / special_chards.md
Created Apr 13, 2019
Testing special characters in OG cards: "Pokémon" – nü mëtäl 'hello'
View special_chards.md

"Pokémon" – nü mëtäl 'hello'

@nolanlawson
nolanlawson / index.html
Created Mar 20, 2019
Repro Firefox scroll bug
View index.html
<html lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta id="theThemeColor" name="theme-color" content="#4169e1">
<meta name="description" content="An alternative web client for Mastodon, focused on speed and simplicity.">
<base href="/">
<link id="theManifest" rel="manifest" href="/manifest.json">
<link id="theFavicon" rel="icon" type="image/png" href="/favicon.png">
@nolanlawson
nolanlawson / App.html
Last active Mar 3, 2019
test rollup with static HTML
View App.html
<div class="shortcut-help-info {inDialog ? 'in-dialog' : ''}">
<div>
<h2>Global</h2>
<div class="hotkey-group">
<ul>
<li><kbd>c</kbd> to compose a new toot</li>
<li><kbd>s</kbd> to search</li>
<li><kbd>1</kbd> - <kbd>6</kbd> to switch columns</li>
<li><kbd>g</kbd> + <kbd>h</kbd> to go home</li>
<li><kbd>g</kbd> + <kbd>n</kbd> to go to notifications</li>
You can’t perform that action at this time.