$pm add vite
# should be success
$pm run vite --version
# shoud be fail
$pm run esbuild --version
This file contains 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
<div> | |
Celcius: <input id="ce" type="number"> | |
Fahrenheit: <input id="fa" type="number"> | |
</div> | |
<script type="importmap"> | |
{ | |
"imports": { | |
"rescript/": "/node_modules/rescript/" | |
} |
This file contains 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
<!-- The script is injected to the `<head>`, so prevent possible network access from the content script. --> | |
<script type="text/javascript"> | |
if ( | |
!Boolean(navigator.userAgent.match(/android/i)) & | |
Boolean(navigator.userAgent.match(/Chrome/) || | |
navigator.userAgent.match(/Firefox/) || | |
navigator.userAgent.match(/Safari/) || | |
navigator.userAgent.match(/MSIE|Trident|Edge/))) { | |
window.FbPlayableAd = { | |
onCTAClick() { |
This file contains 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> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<title>SharedArrayBuffer GC test</title> | |
</head> | |
<body> | |
<div id="root"></div> | |
<script type="module"> |
This file contains 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
// Convert Wikipedia page articles dump (XML) into a stream of JSON | |
// { id: 0, "title": "...", "text": "..." } | |
// The "text" field format will also be converted into plain text | |
import * as path from 'node:path'; | |
import * as fs from 'node:fs'; | |
import XMLParser from 'node-xml-stream'; | |
import ndjson from 'ndjson'; | |
import instaview from 'instaview'; | |
import htmlEntities from 'html-entities'; |
This file contains 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 nextProgress = (progress: number) => { | |
switch (true) { | |
case progress < 40: { | |
return progress + 40 + Math.random() * 10; | |
} | |
case progress < 60: { | |
return progress + 8 + Math.random() * 2; | |
} | |
case progress < 80: { | |
return progress + 3 + Math.random() * 2; |
This file contains 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
#!/usr/bin/env node | |
import * as fs from 'node:fs'; | |
import csvParser from 'csv-parser'; | |
const [csvFile, sku] = process.argv.slice(2); | |
if (!fs.existsSync(csvFile) || !sku) { | |
console.error('Usage: ./report.mjs [CSV file] [SKU]'); | |
process.exit(1); | |
} |
This file contains 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 { parseArgs } from 'node:util'; | |
import { spawn } from 'node:child_process'; | |
import { setTimeout } from 'node:timers/promises'; | |
import prettyBytes from 'pretty-bytes'; | |
import prettyMilliseconds from 'pretty-ms'; | |
let { values, positionals } = parseArgs({ | |
args: process.argv.slice(2), | |
allowPositionals: true, |
This file contains 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 | |
function healthcheck() { | |
local domain=$1 | |
local total_tests=$2 | |
local total_failed_count=0 | |
local ip_list=() | |
for ((i = 0; i < total_tests; i++)); do |
- Design format as a compact binary representation of the GraphQL trusted documents
- The decoder should interface as a ReadableStream
- It aligns the execution order of resolvers ahead-of-time
- Pipe-able
execute
which compatible with exsting GraphQL resolvers- It should support e.g
unpack(docs).pipe(executeStream)
- It should support e.g
- Implement stream acceptance from the client