Screenshots for vercel-labs/fx terminal title and progress PR
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 'dotenv/config' | |
| import { Octokit } from '@octokit/core' | |
| const org = process.env.SPONSORS_ORG! | |
| const token = process.env.SPONSORS_TOKEN! | |
| const octokit = new Octokit({ auth: token }) | |
| const allMembers = await fetchMembers(org) | |
| const membersWithoutTeam = new Set(allMembers.map(m => m.login)) |
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
| // port form https://github.com/bermi/element-xpath | |
| // Create a safe reference to the getElementXpath object for use below. | |
| const getElementXpath = function (el, callback) { | |
| var err, result, nodes, i, n, segments, siblings, id_count; | |
| try { | |
| if (callback && (typeof callback !== "function")) { | |
| throw new Error("Invalid callback supplied"); | |
| } |
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 Proxy = any[] | |
| type Pop<T> = T extends [infer A, ...infer B] ? B : never | |
| type Push<T> = T extends [...infer B] ? [any, ...B] : never | |
| type Add<T extends Proxy, V extends Proxy> = [...T, ...V] | |
| type Double<T extends Proxy> = [...T, ...T] | |
| type Get<A extends Proxy> = A['length'] | |
| type AddOne<A extends Proxy> = Push<A> | |
| type SubOne<A extends Proxy> = Pop<A> |
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 { UnionToIntersection } from 'utility-types'; | |
| type String<T> = T extends string ? T : any | |
| type Keys<T, Field extends keyof T> = | |
| T extends { [P in Field]: infer A } | |
| ? { [P in String<A>]: T } | |
| : never | |
| type LookupTable<Union, key extends keyof Union> = UnionToIntersection<Keys<Union, key>> |
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 Unexact<T> = | |
| T extends null | |
| ? null | |
| : T extends undefined | |
| ? undefined | |
| : T extends number | |
| ? number | |
| : T extends boolean | |
| ? boolean | |
| : T extends string |
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 GetComponentProps<T> = T extends React.ComponentType<infer P> | |
| ? P | |
| : T extends (props: any) => any | |
| ? Parameters<T> | |
| : never; | |
| class ClassComponent extends React.Component<{ a: number }> { | |
| render() { | |
| return <div />; |
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
| git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch example.js' |
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 puppeteer from 'puppeteer' | |
| import fs from 'fs' | |
| async function buildPDF(htmlString) { | |
| const browser = await puppeteer.launch({ headless: true }) | |
| const page = await browser.newPage(); | |
| await page.setContent(htmlString, { waitUntil: 'networkidle0' }) | |
| const pdf = await page.pdf({ | |
| format: 'A4', | |
| displayHeaderFooter: false, |
NewerOlder