A userstyle that makes you wait ten seconds before entering a Hacker News thread. I use stylus to manage mine.
.subtext {
display: inline-block;
background: linear-gradient(to left, transparent 50%, #f60 50%) right;
import openai | |
openai.api_key = "YOUR API KEY HERE" | |
model_engine = "text-davinci-003" | |
chatbot_prompt = """ | |
As an advanced chatbot, your primary goal is to assist users to the best of your ability. This may involve answering questions, providing helpful information, or completing tasks based on user input. In order to effectively assist users, it is important to be detailed and thorough in your responses. Use examples and evidence to support your points and justify your recommendations or solutions. | |
<conversation_history> | |
User: <user input> |
A userstyle that makes you wait ten seconds before entering a Hacker News thread. I use stylus to manage mine.
.subtext {
display: inline-block;
background: linear-gradient(to left, transparent 50%, #f60 50%) right;
// See https://twitter.com/LeaVerou/status/1288721937288638465 | |
function buildGraph(elements) { | |
let elements = new Set(elements); | |
const className = "almanac-2020"; // anything sufficiently unique | |
let map = new Map(); // keep pointers to each element's object | |
let ret = []; | |
for (let element of elements) { | |
// Create initial objects |
You are looking at the most important, and most abundant thing on the web. You can't see it, unfortunately, because it's very small… aaaaand it's invisible — so having a magnifying glass doesn't really help here. But still.
I'm talking, of course, about U+0020
; not to be confused with the band U2, who are just as ubiquitous, but far less useful.
This unicode point, representing the humble space character, is between every word, in every run of text, on every page of the web. And it has a very special characteristic: it's not sticky like glue. If two words are neighbors but there's not enough room for both of them, the space will free the second word to wrap around and start a new line.
Before getting into flexible containers, viewport meta tags, and @media
breakpoints this humble character is what makes the web fundamentally 'responsive'. That is: able to change the layout of its content to suit different devices, contexts, and settings. Browser text does this automa
/* global firebase */ | |
'use strict'; | |
const chauffeurElem = document.querySelector('.chauffeur-script'); | |
function lazyLoad(url) { | |
return new Promise((resolve, reject) => { | |
const scriptElem = document.createElement('script'); | |
scriptElem.type = 'application/javascript'; | |
scriptElem.async = true; |
"use strict"; | |
// animation utils | |
// =============== | |
const trackTime = id => { | |
const [entry] = performance.getEntriesByName(id); | |
if (!entry) { | |
performance.mark(id); |
var DOMTokenListSupports = function(tokenList, token) { | |
if (!tokenList || !tokenList.supports) { | |
return; | |
} | |
try { | |
return tokenList.supports(token); | |
} catch (e) { | |
if (e instanceof TypeError) { | |
console.log("The DOMTokenList doesn't have a supported tokens list"); | |
} else { |
/*! | |
* Copyright 2015 Google Inc. All rights reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |