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
| FROM verdaccio/verdaccio | |
| RUN yarn add verdaccio-github-oauth-ui | |
| ADD config.yaml /verdaccio/conf/config.yaml |
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
| # Turn off POSIX-to-Windows path mangling | |
| # https://github.com/git-for-windows/build-extra/blob/master/ReleaseNotes.md#new-features-61 | |
| export MSYS_NO_PATHCONV=1 |
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
| # | |
| # This makes the above functions work as CLI commands. | |
| # | |
| if [ -n "$1" ] && (type $1 2>&1) | grep -i function > /dev/null; then | |
| $@ | |
| else | |
| echo "Unknown command: $1" | |
| commands=$(compgen -A function | tr '\n' ' ') | |
| echo "All commands: $commands" | |
| exit 1 |
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
| # yarn | |
| # https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored | |
| .yarn/* | |
| !.yarn/patches | |
| !.yarn/plugins | |
| !.yarn/releases | |
| !.yarn/sdks | |
| !.yarn/versions |
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
| slugify () { | |
| echo "$@" | iconv -c -t ascii//TRANSLIT | sed -E 's/[~^]+//g' | sed -E 's/[^a-zA-Z0-9]+/-/g' | sed -E 's/^-+|-+$//g' | tr A-Z a-z | |
| } |
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
| # kind | |
| - Install go — https://go.dev/doc/install | |
| - Install kubectl — https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/ | |
| - Install kind — https://kind.sigs.k8s.io/docs/user/quick-start/#installing-from-release-binaries | |
| ``` | |
| kind create cluster --name playground | |
| kind get clusters | |
| kubectl cluster-info --context kind-playground |
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
| export function download({ | |
| filename, | |
| content, | |
| contentType, | |
| }: { | |
| content: string | |
| contentType: string | |
| filename: string | |
| }) { | |
| const a = document.createElement("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 { ReactElement } from "react"; | |
| export type RenderResult<P> = ReactElement<P, any> | null; | |
| export function serverComponent<P = {}>(fn: (props: P) => RenderResult<P> | Promise<RenderResult<P>>) { | |
| return fn as unknown as (props: P) => RenderResult<P>; | |
| } | |
| // or |
OlderNewer