get list of repos from API
Script to clone/fetch all repos in the list
// @ts-check
const { spawnSync } = require("child_process");
const { existsSync, mkdirSync } = require("fs");
const { resolve: resolvePath } = require("path");| import { useEffect, useRef } from "react"; | |
| export function useCallOnce(fn: () => void) { | |
| const isCalledRef = useRef(false); | |
| useEffect(() => { | |
| if (isCalledRef.current) return; | |
| isCalledRef.current = true; | |
| fn(); | |
| }, []); // eslint-disable-line react-hooks/exhaustive-deps | |
| } |
| services: | |
| proxy: | |
| image: traefik:v2.8 | |
| ports: | |
| - 18880:80 | |
| volumes: | |
| - /var/run/docker.sock:/var/run/docker.sock:ro | |
| command: | |
| - --providers.docker | |
| - --entryPoints.web80.address=:80 |
| # lint project | |
| docker buildx build --target lint . | |
| # build app image | |
| docker buildx build --target app . | |
| # build storybook image | |
| docker buildx build --target storybook . |
| networks: | |
| http-entry: | |
| external: true | |
| secrets: | |
| namecheap-api-key: | |
| file: /secrets/namecheap-api-key.secret | |
| services: | |
| traefik: |
get list of repos from API
Script to clone/fetch all repos in the list
// @ts-check
const { spawnSync } = require("child_process");
const { existsSync, mkdirSync } = require("fs");
const { resolve: resolvePath } = require("path");| import { withAuthUserTokenSSR, AuthAction, type AuthUser } from "next-firebase-auth"; | |
| import { NextApiRequest, NextApiResponse } from "next"; | |
| const checkServerSideAuth = | |
| typeof window !== "undefined" | |
| ? () => {} // "withAuthUserTokenSSR" can only be called server-side. | |
| : withAuthUserTokenSSR({ | |
| whenAuthed: AuthAction.RENDER, | |
| whenUnauthed: AuthAction.REDIRECT_TO_LOGIN, | |
| authPageURL: "401", |
| version: "3.7" | |
| networks: | |
| public-entry: | |
| name: public-entry | |
| services: | |
| ##################################################################################### | |
| traefik: | |
| image: traefik:2.3 |
| #! /bin/bash | |
| set -ve | |
| read -p "username: " USERNAME | |
| read -p "public key: " PUBLIC_KEY | |
| # https://askubuntu.com/a/94067/712137 | |
| adduser --disabled-password --gecos "" $USERNAME | |
| usermod -aG docker $USERNAME |
| bash | |
| echo $$ | |
| ping example.com | |
| exec ping example.com |