-
Notifications
You must be signed in to change notification settings - Fork 310
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: pull out more sync stuff (#11617)
Please read [contributing guidelines](CONTRIBUTING.md) and remove this line.
- Loading branch information
1 parent
15f3cf0
commit 30dc56c
Showing
28 changed files
with
3,653 additions
and
494 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import React from 'react'; | ||
import SearchBar from '@theme-original/SearchBar'; | ||
import AskCookbook from '@cookbookdev/docsbot/react' | ||
import BrowserOnly from '@docusaurus/BrowserOnly'; | ||
/** It's a public API key, so it's safe to expose it here */ | ||
const COOKBOOK_PUBLIC_API_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI2NzVhMGVkODQ4MGI5OThmNzlhNjNhOTciLCJpYXQiOjE3MzM5NTUyODgsImV4cCI6MjA0OTUzMTI4OH0.NzQlH2sfhJkjvnYxoaRgSY6nRyNClxHg57n3-JueN9Q"; | ||
export default function SearchBarWrapper(props) { | ||
return ( | ||
<> | ||
<SearchBar {...props} /> | ||
<BrowserOnly>{() => <AskCookbook apiKey={COOKBOOK_PUBLIC_API_KEY} /> }</BrowserOnly> | ||
</> | ||
); | ||
} |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# This script accepts a string representing the amount of memory allocated as outputted by `heaptrack` | ||
# and standardizes it to be in terms of megabytes as `heaptrack` will report different units depending on the duration. | ||
|
||
DIGITS='([0-9]+(\.[0-9]+)?)' | ||
KILOBYTES_REGEX=^${DIGITS}K$ | ||
MEGABYTES_REGEX=^${DIGITS}M$ | ||
GIGABYTES_REGEX=^${DIGITS}G$ | ||
|
||
if [[ $1 =~ $KILOBYTES_REGEX ]]; then | ||
echo ${BASH_REMATCH[1]} 1000 | awk '{printf "%.3f\n", $1/$2}' | ||
elif [[ $1 =~ $MEGABYTES_REGEX ]]; then | ||
echo ${BASH_REMATCH[1]} | awk '{printf "%.3f\n", $1}' | ||
elif [[ $1 =~ $GIGABYTES_REGEX ]]; then | ||
echo ${BASH_REMATCH[1]} 1000 | awk '{printf "%.3f\n", $1*$2}' | ||
else | ||
echo "Could not parse memory: unrecognized format" 1>&2 | ||
exit 1 | ||
fi |
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
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
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
Oops, something went wrong.