This file has been truncated, but you can view the full file.
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
| [ | |
| 0, | |
| -9.338715555473345e-12, | |
| -2.9079192020718254e-11, | |
| -6.033092905344083e-11, | |
| -9.97701275478445e-11, | |
| -1.999012358917275e-10, | |
| -2.7465515528201067e-10, | |
| -2.8110501582011845e-10, | |
| -4.026860018501908e-10, |
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 { Observable, BehaviorSubject, timer, from } from "rxjs"; | |
| import { filter, tap, mergeMap, take, map, toArray } from "rxjs/operators"; | |
| function rateLimit(count: number, slidingWindowTime: number) { | |
| let tokens = count; | |
| const tokenChanged = new BehaviorSubject(tokens); | |
| const consumeToken = () => tokenChanged.next(--tokens); | |
| const renewToken = () => tokenChanged.next(++tokens); | |
| const availableTokens = tokenChanged.pipe(filter(() => tokens > 0)); |
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
| set -e | |
| START_DIR=$PWD | |
| NODE_VERSION=14.19.1 | |
| BASE_FILE_NAME="node-v$NODE_VERSION" | |
| WITH_ARCH_FILE_NAME=$BASE_FILE_NAME-$(uname -s | awk '{print tolower($0)}')-$(uname -m) | |
| mkdir -p $START_DIR/downloads | |
| [[ -f "$START_DIR/downloads/$BASE_FILE_NAME.tar.gz" ]] || ( | |
| curl https://nodejs.org/download/release/v$NODE_VERSION/$BASE_FILE_NAME.tar.gz --output "$START_DIR/downloads/$BASE_FILE_NAME.tar.gz" | |
| (cd "$START_DIR/downloads" && tar -xvzf ./$BASE_FILE_NAME.tar.gz) |
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'; | |
| const createElement = React.createElement; | |
| (React as any).createElement = (...args: any[]) => { | |
| const el = (createElement as any)(...args); | |
| if ( | |
| typeof el.props.children === "string" && | |
| el._source && | |
| el.props.children | |
| ) { | |
| console.log("FOUND TEXT", { text: el.props.children, source: el._source }); |