Intercept requests with puppeteer

useful to mock backend responses when you don’t want to have to donate RAM to minikube when developing locally // from const puppeteer = require(‘puppeteer’); (async function main() { try { const browser = await puppeteer.launch({ headless: false }); const [page] = await browser.pages(); await page.setRequestInterception(true); page.on(‘request’, (interceptedRequest) => { if (interceptedRequest.url().includes(‘additional_metrics.json’) { interceptedRequest.respond({ […]

Numeronyms make Awful Names

a16z – Andresson Horowitz. I don’t hear/use this often enough to remember it, so completely forget what it stands for a11y – Accessibility. I come across this all the time, yet can never remember what word it is short for. Yet I link ‘a11y’ to the concept of accessibility. My issue with this is possibly […]

Sass Regrex

I was writing some large blocks of repetitive text in SCSS. Had some colors defined, and we wanted to group them in color-ranges, like this. So we started with with: $green-50: #f1fdf6; $green-100: #dcf5e7; $green-200: #b3e6c8; $green-300: #75d09b; $green-400: #37b96d; $green-500: #1aaa55; $green-600: #168f48; $green-700: #12753a; $green-800: #0e5a2d; $green-900: #0a4020; $green-950: #072b15; We want to […]

Troubles with input type=”number”

Using type=”number” on input fields is far less useful than I originally thought. We were previously using it for the form on Framer. Since they are number fields, having the number keyboard pop up on phones is something we wanted. It also prevents people typing in non-numbers, so there’s some free form validation. Here are […]

Utility CSS Is Not Inline Styles

I love utility CSS. It means I write CSS once, and change it rarely. I can quickly and easily add/change pages, and can often read a chunk of markup and know what something will look like. text-right font-bold is more obvious to me than nav_item–inner. But a common complaint is “it’s like inline styles”. This […]

5 Quotes About Getting Started

“The secret of getting ahead is getting started.”- Mark Twain “To begin, begin.”- William Wordsworth “The journey of a thousand miles begins with a single step.”- Lao Tzu “What is not started today is never finished tomorrow.”- Johann Wolfgang von Goethe “There are only two mistakes one can make along the road to truth; not […]