Skip to content

Instantly share code, notes, and snippets.

#! /usr/bin/env bash
read -d '\0' HEREDOC << 'EOF'
usage: compare.sh <flag>
<flag> [1> <path>] [2> <path>]
EOF
echo "${HEREDOC}"
readonly FLAG="UHVscCBGaWN0aW9u"
#! /usr/bin/env bash
# Populate the current shell with environment variables sourced from the .env
# file in the current working directory.
#
# This script is designed to take advantage of how Yarn assigns the INIT_CWD
# environment variable based on where a package.json script is called from in a
# workspace-enabled project.
#
# EXAMPLE USAGE:
@Bengejd
Bengejd / Util.lua
Created May 8, 2020 19:50
Utility functions that I use in WoW Addon Development
local _, core = ...;
local _G = _G;
local L = core.L;
local Util = core.Util;
local PDKP = core.PDKP;
local Defaults = core.defaults;
-- WoW Classic Alliance Classes
local classes = {
@g-cqd
g-cqd / Fonts.css
Last active February 8, 2021 17:28
Font-Face Starter Pack
@font-face {
font-family: "Inter";
font-style: normal;
font-weight: 100;
font-display: swap;
src: url("https://rsms.me/inter/font-files/Inter-Thin.woff2") format("woff2"),
url("https://rsms.me/inter/font-files/Inter-Thin.woff") format("woff");
}
@font-face {
@wojpawlik
wojpawlik / .editorconfig
Last active October 28, 2020 13:43
Lists methods without TypeScript typings.
# http://editorconfig.org/
root = true
[*]
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
@knightsc
knightsc / build-xnu-6153.11.26.sh
Created February 18, 2020 15:08
A script to build XNU version 6153.11.26 (macOS Catalina 10.15).
#! /bin/bash
#
# build-xnu-6153.11.26.sh
# Scott Knight
#
# Based on the script by Brandon Azad
# https://gist.github.com/bazad/654959120a423b226dc564073b435453
#
# A script showing how to build XNU version 6153.11.26 on macOS Catalina
# 10.15 with Xcode 11.13.1.
@Meorawr
Meorawr / async.lua
Last active September 8, 2024 20:17
Lua 5.1 Async/Await
#!/usr/bin/lua5.1
--- Async/Await for Lua 5.1
-- This script implements async/await functions for Lua, allowing tasks to
-- be queued and scheduled independently.
--
-- This is just an example and has a bunch of issues, isn't tested, isn't
-- even actually used anywhere; I basically just got bored and had one of
-- those "what if?" type ideas 6 hours ago.
local co_create = coroutine.create
function Invoke-NativeCommand {
<#
.SYNOPSIS
Invoke a native command (.exe) as a new process.
.DESCRIPTION
Invoke-NativeCommand executes an arbitrary executable as a new process. Both the standard
and error output streams are redirected.
Error out is written as a single non-terminating error. ErrorAction can be used to raise
@phil-blain
phil-blain / .gitattributes
Last active January 19, 2026 03:23
Git pickaxe : show only relevant hunks (filter displayed hunks using the given search string)
*.md diff=markdown
@sebmarkbage
sebmarkbage / WhyReact.md
Created September 4, 2019 20:33
Why is React doing this?

I heard some points of criticism to how React deals with reactivity and it's focus on "purity". It's interesting because there are really two approaches evolving. There's a mutable + change tracking approach and there's an immutability + referential equality testing approach. It's difficult to mix and match them when you build new features on top. So that's why React has been pushing a bit harder on immutability lately to be able to build on top of it. Both have various tradeoffs but others are doing good research in other areas, so we've decided to focus on this direction and see where it leads us.

I did want to address a few points that I didn't see get enough consideration around the tradeoffs. So here's a small brain dump.

"Compiled output results in smaller apps" - E.g. Svelte apps start smaller but the compiler output is 3-4x larger per component than the equivalent VDOM approach. This is mostly due to the code that is usually shared in the VDOM "VM" needs to be inlined into each component. The tr