Skip to content

Instantly share code, notes, and snippets.

View sscotth's full-sized avatar
𝄆 🍽 🛌 👨‍💻 𝄇

Scott Humphries sscotth

𝄆 🍽 🛌 👨‍💻 𝄇
View GitHub Profile
ef4 /
Last active April 2, 2024 17:38
Webpack 5 Node Polyfills Upgrade Cheatsheet

Webpack 5 Node Polyfills Upgrade Cheatsheet

Webpack 4 automatically polyfilled many Node APIs in the browser. This was not a great system, because it could lead to surprisingly giant libraries getting pulled into your app by accident, and it gave you no control over the exact versions of the polyfills you were using.

So Webpack 5 removed this functionality. That means you need to make changes if you were relying on those polyfills. This is a quick reference for how to replace the most common patterns.

List of polyfill packages that were used in webpack 4

For each automatically-polyfilled node package name on the left, this shows the name of the NPM package that was used to polyfill it on the right. Under webpack 5 you can manually install these packages and use them via resolve.fallback.

shivangp / southwest_auto_checkin.user.js
Last active January 11, 2024 22:51 — forked from ryanizzo/southwest_auto_checkin.user.js
Auto Check-In to Southwest Flights
// ==UserScript==
// @name Auto Check-In to Southwest Flights
// @namespace
// @version 1.9
// @author Nicholas Buroojy (
// @contributor Ryan Izzo (
// @contributor JR Hehnly ( @stormchasing)
// @contributor Trevor McClellan (
// @description Automatically check in to Southwest Airline flights at the appropriate time.
// @include*
sscotth / keystroke the clipboard extended.workflow
Last active January 2, 2024 12:12
Paste as keystrokes (macOS)
# Why?
# To paste text into windows that normally don't allow it or have access to the clipboard.
# Examples: Virtual machines that do not yet have tools installed, websites that hijack paste
# Extended vs Simple?
# * Includes an initial delay to allow you to change active windows
# * Adds small delay between keypresses for slower responding windows like SSH sessions
# * Better handling of numbers
# * VMWare bug fix
* React Static Boilerplate
* Copyright © 2015-2016 Konstantin Tarkus (@koistya)
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
krisselden /
Last active July 28, 2021 15:44
Trace Chrome Deopts

How to use

./ http://localhost:4200

Wait until your page renders.

bmhatfield / .profile
Last active March 18, 2024 07:43
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
gaearon / slim-redux.js
Last active March 25, 2024 19:12
Redux without the sanity checks in a single file. Don't use this, use normal Redux. :-)
function mapValues(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
result[key] = fn(obj[key], key);
return result;
}, {});
function pick(obj, fn) {
return Object.keys(obj).reduce((result, key) => {
if (fn(obj[key])) {
# Hello, and welcome to makefile basics.
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
# Once you're done here, go to
# to learn SOOOO much more.
staltz /
Last active April 12, 2024 16:37
The introduction to Reactive Programming you've been missing
scottjehl /
Last active August 12, 2023 16:57
Comparing two ways to load non-critical CSS

I wanted to figure out the fastest way to load non-critical CSS so that the impact on initial page drawing is minimal.

TL;DR: Here's the solution I ended up with:

For async JavaScript file requests, we have the async attribute to make this easy, but CSS file requests have no similar standard mechanism (at least, none that will still apply the CSS after loading - here are some async CSS loading conditions that do apply when CSS is inapplicable to media: ).

Seems there are a couple ways to load and apply a CSS file in a non-blocking manner: