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> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>HTML on Black Hole Accretion Disc</title> | |
| <style> | |
| * { margin: 0; padding: 0; box-sizing: border-box; } | |
| body { background: #000; overflow: hidden; } | |
| canvas#gl { display: block; width: 100vw; height: 100vh; cursor: grab; } |
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 React from "react"; | |
| type Props = { | |
| exportedName?: string; | |
| fetchFn(): Promise<any>; | |
| [x: string]: any; // rest props | |
| }; | |
| export const DynamicSsrImport = ({ | |
| exportedName = "default", |
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 utf8 = require('utf8'); | |
| const quotedPrintable = require('quoted-printable'); | |
| const fs = require('fs'); | |
| const readline = require('readline'); | |
| const DELIMITER = ';CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:'; | |
| const readStream = fs.createReadStream('./contacts.vcf'); | |
| const writeStream = fs.createWriteStream('./contactsDecoded.vcf', { | |
| encoding: 'utf8', |
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 React from 'react'; | |
| import { fetchFn } from './myAsyncService' | |
| export function cancellableEffect(asyncFunction, afterFunction) { | |
| let isCancelled = false; | |
| const runAsyncFunction = async () => { | |
| const data = await asyncFunction(); | |
| if (isCancelled) { |