This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function IsolateCSS(props: { children: React.ReactNode }) { | |
const onceRef = useRef(false); | |
const [shadowRoot, setShadowRoot] = useState<ShadowRoot>(); | |
const ref = useCallback((ref: HTMLDivElement | null) => { | |
if (ref && onceRef.current === false) { | |
onceRef.current = true; | |
setShadowRoot(ref.attachShadow({ mode: 'open' })); | |
} | |
}, []); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// I'm tired of extensions that automatically: | |
// - show welcome pages / walkthroughs | |
// - show release notes | |
// - send telemetry | |
// - recommend things | |
// | |
// This disables all of that stuff. | |
// If you have more config, leave a comment so I can add it!! | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Ensure we're working on the latest version of the main branch | |
git switch main | |
git fetch | |
git pull | |
# Create a new branch | |
git switch -c vitest |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name ASTx2 Emulator | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author @BawAppie | |
// @match https://*/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=ahnlab.com | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 20x faster replacement for "npm run" | |
# - It supports scripts executing a built-in shell function | |
# - It supports scripts executing a binary found in PATH | |
# - It supports scripts executing a binary found in node_modules | |
# - It supports passing arguments and options to scripts | |
# - It supports reading scripts either via ripgrep (fast) or via jq (slower, but safer) | |
# - It adds ./node_modules/.bin to the $PATH | |
# - It handles gracefully when a script has not been found | |
# - It handles gracefully when "&", "&&", "|", "||", or ENV variables are used, falling back to "npm run" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
===== | |
parse | |
===== | |
canada x serde_json x 14.41 ops/sec ±3.31% (40 runs sampled) | |
canada x serde_wasm_bindgen x 90.55 ops/sec ±0.53% (77 runs sampled) | |
canada x msgpack x 101 ops/sec ±1.90% (72 runs sampled) | |
citm_catalog x serde_json x 131 ops/sec ±0.64% (83 runs sampled) | |
citm_catalog x serde_wasm_bindgen x 192 ops/sec ±1.02% (85 runs sampled) | |
citm_catalog x msgpack x 161 ops/sec ±1.09% (82 runs sampled) | |
twitter x serde_json x 203 ops/sec ±0.89% (85 runs sampled) |
Remix Deferred is currently implemented on top of React's Suspense model but is not limited to React. This will be a quick dive into how "promise over the wire" is accomplished.
It isn't rocket science, but a quick recap of how frameworks such as react do SSR:
- Load data
- Render the app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name jQuery ajax force async | |
// @version 1 | |
// @grant none | |
// @run-at document-end | |
// @match https://stdict.korean.go.kr/search/* | |
// ==/UserScript== | |
const a = () => { | |
const ajax = window.$.ajax.bind(window.$) |