ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
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
| type AsyncMapParams = { | |
| timeout: number; | |
| steps: number; | |
| coolDown?: number; | |
| } | |
| const asyncMap = async <I, O>(inList: I[], fn: (input: I) => O, inParams: AsyncMapParams): Promise<O[]> => { | |
| const params = Object.assign({}, { | |
| timeout: 16, | |
| coolDown: 16, |
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
| const REG = { | |
| RAX: 0, | |
| RBX: 1, | |
| RCX: 2, | |
| RDX: 3, | |
| } as const; | |
| const ADDRESSING_MODES = { | |
| AUTO: 0b00, | |
| REGISTER: 0b01, |
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
| // constants.js | |
| const authLock = createFence(); | |
| // somewhere in auth.js | |
| setInterval(() => { | |
| authLock.lockFence(updateToken(refreshToken)); | |
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
| const useExport = (tree, documentTitle, ready) => { | |
| const containerRef = useRef(null); | |
| const frameRef = useRef(); | |
| const [readyToExport, setReadyToExport] = useState(false); | |
| useEffect(() => { | |
| if (!ready) return; | |
| const sheet = new ServerStyleSheet(); |
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
| #include <math.h> | |
| double converge(double current, double target, double step_size) { | |
| double direction = target - current; | |
| direction = (direction > 0) - (direction < 0); | |
| double remaining = target - current; | |
| double step = direction * step_size; | |
| return current + fmin(step, direction * remaining); | |
| } |
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
| const MAX_HEAP_SIZE = 5000; | |
| let HEAP_BASE = 0; | |
| const HEAP = new ArrayBuffer(MAX_HEAP_SIZE); | |
| const seal = () => HEAP.slice(0, HEAP_BASE); | |
| const reset = () => { | |
| HEAP_BASE = 0; | |
| new Uint8Array(HEAP).fill(0); |
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
| const fs = require('fs'); | |
| const inspector = require('node:inspector'); | |
| const { statSync } = fs; | |
| Object.assign(fs, { | |
| statSync() { | |
| if (arguments[0].includes('\x00')) { | |
| console.log('YOU ACTIVATED MY TRAP CARD!!!', arguments[0].split('')); | |
| inspector.open(); | |
| inspector.waitForDebugger(); |
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
| const fs = require('fs'); | |
| const { stat, statfs, statSync, statfsSync } = fs; | |
| Object.assign(fs, { | |
| stat(){ | |
| console.log('Running stat', arguments[0], new Error().stack); | |
| return stat.call(fs, ...[...arguments]); | |
| }, | |
| statfs(){ |
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
| import { render } from "react-dom"; | |
| import { atom, useAtom } from "jotai"; | |
| import { useEffect, useState } from "react"; | |
| const portalGun = () => { | |
| const Children = atom(null); | |
| const EntryPortal = ({ children }) => { | |
| const [, setChildren] = useAtom(Children); |
NewerOlder