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
class TimeoutError extends Error {} | |
export async function promiseTimeout<T> (promise: Promise<T>, timeout: number): Promise<T> { | |
return await new Promise(async (resolve, reject) => { | |
let timedout = false | |
const t = setTimeout(() => { | |
timedout = true | |
reject(new TimeoutError('timedout')) | |
}, timeout) |
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
yay -S mullvad-vpn |
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
moonbirds-oddities https://live---metadata-5covpqijaa-uc.a.run.app/oddities_images/1 | |
alphasharksofficial https://ettcvwksjfmsyce9.sfo3.digitaloceanspaces.com/1.jpg | |
illusion-pt-1 https://assets.bueno.art/images/cff13f6e-83dd-46a4-ac7a-696fc8f0cfd1/default/1?s=a1549611ccf81a9252c2ff1977757d15 | |
genesis-box https://wcnft.mypinata.cloud/ipfs/Qme4SpgD8jgNyDo8AUfAsHfWS4qL8du7Vw4J4qzJ3YKS4J | |
webaverse-genesis-pass https://arweave.net/wGACLov8--kcHSbwkNJ_hmZj76QC_Ddkj1LFdRePTpY/OT_Thumbnail.png | |
strangershq https://factorlabs.mypinata.cloud/ipfs/QmXDWzbzoajAr16ACrXLa2LpczVj86T83WvZ3kcvCu6fEg/CodingProjects/Crypto/StrangersV2/Strangers/FINALFINAL/1.png | |
blurbears ipfs://bafybeihwzci6b426f7bekqgwa6zu4vldioqri2ui2gdwd6as3p6u75urfu/1.png | |
blurglyphs ipfs://QmZKyoLPBxSuyeckFqUdxzzEXyryNdWMjFJwdYMosEe9jX | |
remilio-babies https://remilio.org/remilio/1.png | |
town-star undefined |
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 express from 'express' | |
import cors from 'cors' | |
const app = express() | |
app.use(cors()) | |
app.options('*', cors()) |
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 cache: { | |
[tokenSymbol: string]: Promise<any> | |
} = {} | |
const cacheTimestamps: { | |
[tokenSymbol: string]: number | |
} = {} | |
class MyClass { | |
cacheTimeMs = 5 * 60 * 1000 |
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
GIT_COMMITTER_DATE="Sat Oct 11 00:29:26 2018 -0700" git commit --amend --date="Sat Oct 11 00:29:26 2018 -0700" |
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 React from 'react' | |
import { Prism as SyntaxHighlighter } from 'react-syntax-highlighter' | |
import { tomorrow as theme } from 'react-syntax-highlighter/dist/esm/styles/prism' | |
export function SyntaxHighligher (props: { code: string }) { | |
const { code } = props | |
return ( | |
<SyntaxHighlighter | |
language="javascript" | |
style={theme} |
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
server { | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
access_log off; | |
resolver 8.8.8.8 ipv6=off; | |
location / { | |
proxy_pass $arg_url; | |
proxy_ssl_server_name on; |
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 wait from 'wait' | |
class MyClass { | |
ready = false | |
async tilReady (): Promise<boolean> { | |
if (this.ready) { | |
return true | |
} | |
await wait(100) |
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 buf = Buffer.alloc(8) | |
const view = new DataView(buf.buffer) | |
view.setBigInt64(0, BigInt(100), false) // true when little endian | |
console.log(buf.toString('hex')) // "0000000000000064" |