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 { Toaster as RHToaster } from 'react-hot-toast'; | |
import { useMedia } from 'react-use'; | |
import { useTheme } from 'next-themes'; | |
import type { WithProps } from '~/types'; | |
enum ThemeType { | |
LIGHT = 'light', | |
DARK = 'dark', | |
SYSTEM = 'system', |
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 setTimeoutAsync = < | |
TCallback extends Function = () => void | Promise<void> | |
>( | |
cb: TCallback, | |
delay: number | |
) => | |
new Promise((resolve) => | |
setTimeout(() => { | |
resolve(cb()); | |
}, delay) |
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 { createHash } from "node:crypto"; | |
const COLOR_NAMES = ["red", "green", "blue"]; | |
const COLOR_SHADES = [500, 600, 700]; | |
const COLORS: Record< | |
typeof COLOR_NAMES[number], | |
Record<typeof COLOR_SHADES[number], 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
// pages/api/auth/[...nextauth].ts | |
import NextAuth from 'next-auth'; | |
import TwitterProvider from 'next-auth/providers/twitter'; | |
import type { OAuthConfig, OAuthUserConfig, Provider } from 'next-auth/providers'; | |
/** | |
* Supported Provider Type | |
* |
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
/** | |
* Note: Requires the following dependencies: | |
* - `motion` | |
* - `react-use` | |
* - `is-web-crawler` | |
*/ | |
import { animate, spring } from 'motion' | |
import { isCrawlerUserAgent } from 'is-web-crawler' | |
import { useEffect, useRef } from 'react' |
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 { randomInt } from "crypto"; | |
interface GenerateOtpOptions { | |
/** | |
* Chars | |
* | |
* @description Whether to include A-Z characters in the generated passcode | |
* | |
* @default true | |
*/ |
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
[package] | |
name = "hubble" | |
version = "1.1.1" | |
authors = ["N U R O ™"] | |
edition = "2018" | |
[dependencies] | |
egg-mode = "0.13.0" | |
failure = "0.1.6" | |
headless_chrome = "0.9.0" |
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
[package] | |
name = "cosmo" | |
version = "1.1.1" | |
authors = ["N U R O ™"] | |
edition = "2018" | |
[dependencies] | |
egg-mode = "0.13.0" | |
failure = "0.1.6" | |
reqwest = "0.9.22" |
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
# Host directory paths | |
config_dir=/mnt/Pi/config/ | |
downloads_dir=/mnt/Pi/downloads/ | |
media_dir=/mnt/Pi/media/ |