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
<!DOCTYPE html> | |
<script> | |
customElements.define("x-input", class extends HTMLElement { | |
static formAssociated = true; | |
#input; | |
#internals; | |
constructor() { | |
super(); | |
this.#input = document.createElement("input"); |
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
@echo off | |
setlocal enabledelayedexpansion | |
if not exist %~dp0timeit.exe ( | |
curl -Lo %~dp0timeit.exe https://github.com/MarkTiedemann/rktools2k3/raw/master/timeit.exe | |
) | |
if not exist %~dp0jq.exe ( | |
curl -Lo %~dp0jq.exe https://github.com/stedolan/jq/releases/download/jq-1.6/jq-win64.exe | |
) |
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
@echo off | |
setlocal | |
:: Example for using the JGit CLI on Windows | |
:: Downloaded from https://gist.github.com/MarkTiedemann/4a91db19983867fa1cd0c72f496ead2e | |
:: d(irectory) p(ath) of argument 0 (the current batch file) | |
set "basedir=%~dp0" | |
:: Remove trailing slash | |
set "basedir=%basedir:~0,-1%" |
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 rawString = Symbol(); | |
export interface RawString { | |
[rawString]: string; | |
}; | |
export function raw(str: string): Readonly<RawString> { | |
const obj: RawString = Object.create(null); | |
obj[rawString] = str; | |
return Object.freeze(obj); |
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
CSS Diner: https://flukeout.github.io/ | |
Flexbox Froggy: https://flexboxfroggy.com/ | |
Grid Garden: https://cssgridgarden.com/ |
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
@echo off | |
if not exist bun ( | |
curl -LO https://github.com/oven-sh/bun/releases/download/bun-v0.1.2/bun-linux-x64.zip | |
tar xf bun-linux-x64.zip | |
move bun-linux-x64\bun bun | |
rd bun-linux-x64 | |
del bun-linux-x64.zip | |
) |
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
/// <reference no-default-lib="true"/> | |
interface ActiveXObject { | |
new (s: "Scripting.FileSystemObject"): FileSystemObject; | |
} | |
declare var ActiveXObject: ActiveXObject; | |
/** | |
* Provides access to a computer's file system. |
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
@echo off | |
git clone --depth 1 --filter=blob:none --sparse https://github.com/DefinitelyTyped/DefinitelyTyped | |
pushd DefinitelyTyped | |
git sparse-checkout set types/node | |
rd /q /s .git | |
popd | |
ren DefinitelyTyped node_modules | |
ren node_modules\types @types |
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 fs from "node:fs"; | |
import crypto from "node:crypto"; | |
const hashAlgo = "sha512"; | |
function hash(file) { | |
return new Promise(resolve => { | |
fs.createReadStream(file).pipe( | |
crypto.createHash(hashAlgo).setEncoding("base64") | |
).on("finish", function() { |
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
// node --experimental-policy=policy.json evil.mjs | |
import fs from "node:fs"; | |
console.log(fs.readFileSync("./no-secret.txt", "utf-8")); | |
console.log(fs.readFileSync("./secret.txt", "utf-8")); |