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 | |
set -euxo pipefail | |
TEMP_DIR=$(mktemp -d) | |
mkdir -p $TEMP_DIR/package_a/src/namespace/a | |
mkdir -p $TEMP_DIR/package_b/src/namespace/b | |
mkdir -p $TEMP_DIR/package_c/src/namespace/c |
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
animatediff: | |
- model: mm_sdxl_beta.ckpt | |
download_url: https://huggingface.co/guoyww/animatediff/resolve/fdfe36afa161e51b3e9c24022b0e368d59e7345e/mm_sdxl_v10_beta.ckpt | |
commit_sha: fdfe36afa161e51b3e9c24022b0e368d59e7345e | |
md5: b211db6a009ecf8f63c4b7cfaa6dbfc3 | |
- model: mm_sd15_v2.ckpt | |
download_url: https://huggingface.co/guoyww/animatediff/resolve/fdfe36afa161e51b3e9c24022b0e368d59e7345e/mm_sd_v15_v2.ckpt | |
commit_sha: fdfe36afa161e51b3e9c24022b0e368d59e7345e | |
md5: 52ed8a4d2f0cf64c8d85f04bc8e38c1e | |
- model: mm_sd15_v3_adapter.ckpt |
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
/* eslint-disable */ | |
const fetch_ = require('node-fetch'); | |
const fetchWithTimeout = async (url, options, timeout) => { | |
const controller = new AbortController(); | |
const id = setTimeout(() => controller.abort(), timeout); | |
const response = await fetch(url, { | |
...options, |
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 {ReadableStream} from 'node:stream/web'; | |
// Custom logger that accumulates log statements | |
const logger = { | |
logs: [], | |
log(...messages) { | |
this.logs.push(messages.join(' ')); | |
}, | |
error(...messages) { | |
this.logs.push(`ERROR: ${messages.join(' ')}`); |
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
async function checkAvailability(plate: string): Promise<string> { | |
const encodedPlate = encodeURIComponent(plate); | |
const url = `https://www.myplates.com/api/licenseplates/passenger/carbon-fiber/${encodedPlate}?_=${Date.now()}`; | |
const response = await fetch(url, { | |
headers: { | |
accept: 'application/json, text/javascript, */*; q=0.01', | |
'accept-language': 'en-US,en;q=0.9', | |
Referer: 'https://www.myplates.com/design/personalized/passenger/carbon-fiber/', | |
'Referrer-Policy': 'strict-origin-when-cross-origin', | |
}, |
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 | |
set -euxo pipefail | |
./pnpm exec typedoc \ | |
--treatWarningsAsErrors \ | |
--excludePrivate \ | |
--gitRevision master \ | |
--githubPages false \ | |
--plugin typedoc-plugin-markdown \ |
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
FROM node:16-buster | |
WORKDIR /app | |
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - | |
RUN echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list | |
RUN apt-get update | |
RUN apt-get install -y google-chrome-stable | |
COPY package.json ./ |
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
let x = 0; | |
new Promise(resolve => resolve()).then(() => { | |
x = 1 | |
new Promise(resolve => resolve()).then(() => { | |
x = 2 | |
}) | |
}) | |
await flushAllMicrotasks() |
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
function resize(imageDataUrl) { | |
return new Promise((resolve, reject) => { | |
const img = new Image() | |
img.addEventListener('error', reject) | |
img.addEventListener('load', () => { | |
try { | |
canvas.width = img.width | |
canvas.height = img.height | |
context.drawImage(img, 0, 0) | |
const imageData = context!.getImageData(0, 0, img.width, img.height) |
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 fs = require('fs'); | |
const fetch = require('isomorphic-fetch'); | |
async function go() { | |
const hashes = fs.readFileSync('hashes.txt', 'utf-8').split('\n'); | |
for (const hash of hashes) { | |
if (!hash.trim()) continue; | |
const response = await fetch(`https://api.github.com/repos/GoogleChrome/lighthouse/commits/${hash}`); | |
const json = await response.json(); |
NewerOlder