mkdir monorepo
cd monorepo
git init .
# fetch old repos
git remote add repo_1 XXX
git fetch repo_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
# /Users/xxx/Library/Application Support/k9s/hotkey.yml | |
hotKey: | |
# Hitting Shift-0 navigates to your CNPG clusters | |
shift-Q: | |
shortCut: Shift-Q | |
description: Viewing CNPG clusters | |
command: postgresql.cnpg.io/v1/clusters |
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
// custom Next.js component for displaying Strapi images with a custom loader | |
// NEXT_PUBLIC_BACKEND_URL_IMAGES needs to be set in the .env file, e.g.: NEXT_PUBLIC_BACKEND_URL_IMAGES=http://localhost:1337 | |
// For placeholders to work, install strapi-plugin-placeholder | |
'use client'; | |
import { default as NextImage, ImageLoader, ImageProps } from 'next/image'; | |
import _strapiBreakpoints from '/src/data/preBuild/strapiBreakpoints.json'; | |
export interface IStrapiImage { |
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
# main | |
llama-index | |
langchain |
Although @setup/node as a built-in cache option, it lacks an opportunity regarding cache persistence. Depending on usage, the action below might give you faster installs and potentially reduce carbon emissions (♻️🌳❤️).
Yarn 3+/4+ with nodeLinker: node-modules. (Not using yarn ? see the corresponding pnpm 7/8+ action gist)
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
const { Fragment, useState, useEffect } = require("react"); | |
const { Transition } = require("@headlessui/react"); | |
module.exports = ({ | |
title = "", | |
content = "", | |
buttons = [], | |
classes = "", | |
onDiscard = "", | |
onConfirm = "", |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'
instead ofconst foo = require('foo')
to import the package. You also need to put"type": "module"
in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)
from CommonJS instead ofrequire(…)
. - Stay on the existing version of the package until you can move to ESM.
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 { useCallback, useState, useEffect, useRef } from "react"; | |
import { | |
LiteralToPrimitive, | |
UnpackNestedValue, | |
useFormContext | |
} from "react-hook-form"; | |
import { useDebouncedCallback } from "use-debounce"; | |
/** | |
* Returns state of a warning for the given form field. |
- Regular expressions are special strings that represent a search pattern. Also known as "regex" or "regexp", they help programmers match, search, and replace text.
- Regular expressions can appear cryptic because a few characters have special meaning.
- The goal is to combine the symbols and text into a pattern that matches what you want, but only what you want.
- JavaScript has multiple ways to use regexes. One way to test a regex is using the
.test()
method. The.test()
method takes the regex, applies it to a string (which is placed inside the parentheses), and returnstrue
orfalse
if your pattern finds something or not.
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
#!/bin/bash -e | |
usage () | |
{ | |
echo "Usage: $0 CONTAINER [--override-arch s390x] [--tar-flags tar-extraction-flags]" | |
echo "Usage: $0 quay.io/crw/operator-metadata:latest" | |
echo "Usage: $0 quay.io/crw/plugin-java8-openj9-rhel8:2.4 --override-arch s390x" | |
echo "Usage: $0 quay.io/crw/pluginregistry-rhel8:latest --tar-flags var/www/html/*/external_images.txt" | |
echo "Usage: $0 quay.io/crw/devfileregistry-rhel8:latest --tar-flags var/www/html/*/external_images.txt --override-arch ppc64le" | |
exit |
NewerOlder