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
<!-- | |
Infinte Marquee Scrolling | |
Created by Surjitb S M | |
https://twitter.com/surjithctly | |
--> | |
<div class="relative flex min-h-screen flex-col justify-center overflow-hidden bg-gray-50 py-6 sm:py-12"> | |
<img src="/img/beams.jpg" alt="" class="absolute top-1/2 left-1/2 max-w-none -translate-x-1/2 -translate-y-1/2" width="1308" /> | |
<div class="absolute inset-0 bg-[url(/img/grid.svg)] bg-center [mask-image:linear-gradient(180deg,white,rgba(255,255,255,0))]"></div> |
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
const getRandomColor = () => | |
"#" + Math.floor(Math.random() * 16777215).toString(16); |
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
const crypto = require('crypto'); | |
// const { privateKey, publicKey } = crypto.generateKeyPairSync('rsa', { | |
// modulusLength: 2048, | |
// publicKeyEncoding: { | |
// type: "pkcs1", | |
// format: "pem", | |
// }, | |
// privateKeyEncoding: { | |
// type: "pkcs1", |
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
import { Controller, get, Message, useFormContext } from "react-hook-form" | |
import { FormElement, Input as NextInput, InputProps } from "@nextui-org/react" | |
import { helperText } from "@/utils/constants" | |
import { PatternType } from "@/types" | |
import { useIMask } from "react-imask" | |
import React, { MutableRefObject, useState } from "react" | |
type Props = { | |
pattern?: PatternType | |
message?: string |
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
import { Listbox, Transition } from "@headlessui/react" | |
import { Button } from "@nextui-org/react" | |
import { Fragment, useState } from "react" | |
import { FiChevronDown } from "react-icons/fi" | |
import cn from "classnames" | |
import { Controller, get, useFormContext } from "react-hook-form" | |
import { PatternType, RoleMapType } from "@/types" | |
import { helperText } from "@/utils/constants" | |
type LocalSelectProps = { |
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
git config --global --add safe.directory G:/software/star-project/storybook-static |
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
Get first/second slash | |
^\/[^/]+\/([^/]*) -> "/path/path2/path3/path4" -> ["/path/path2"] |
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
const months = useMemo(() => { | |
return new Array(12).fill(null).map((n, i) => { | |
return format(new Date(new Date().getFullYear(), i), "MMM") | |
}) | |
}, []) | |
const years = useMemo(() => { | |
const y = new Array(10).fill(null) | |
const min = new Date().getFullYear() - y.length | |
return y |
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
You may use this regex with multiple | |
symbol is required: /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/ | |
symbol is not requreid: /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-_]).{8,}$/ |
NewerOlder