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 { NextSeo } from "next-seo"; | |
import Head from "next/head"; | |
import { useRouter } from "next/router"; | |
type IMetaProps = { | |
title: string; | |
description: string; | |
image?: string; | |
canonical?: 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
const theme = (() => { | |
let theme = 'light' | |
if (typeof localStorage !== 'undefined' && localStorage.getItem('theme')) { | |
theme = localStorage.getItem('theme') | |
} else if (window.matchMedia('(prefers-color-scheme: dark)').matches) { | |
theme = 'dark' | |
} | |
window.localStorage.setItem('theme', theme) | |
return theme |
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
name: 5-minute-cron | |
on: | |
schedule: | |
- cron: "*/5 * * * *" | |
jobs: | |
cron: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Call the sync API endpoint on Vercel | |
run: | |
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 { Provider } from "next-auth/providers"; | |
export const FigmaProvider: Provider = { | |
id: "figma", | |
name: "Figma", | |
type: "oauth", | |
authorization: { | |
url: "https://www.figma.com/oauth", | |
params: { | |
scope: "file_read", |
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
// Name: Export Toggl Entries to CSV | |
import "@johnlindquist/kit"; | |
const jsonexport = await npm("jsonexport"); | |
const API_URL = await env("API_URL"); | |
const EMAIL = await env("EMAIL"); | |
const PASSWORD = await env("PASSWORD"); | |
const OUTPUT_PATH = await env("OUTPUT_PATH"); | |
const NAME = await env("NAME"); |
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 useGsapContext = ( | |
func: gsap.ContextFunc, | |
deps: any[] = [], | |
target?: any, | |
) => { | |
useEffect(() => { | |
const ctx = gsap.context(func, target) | |
return () => ctx?.revert() | |
}, deps) |
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 fetch = require('node-fetch'); | |
const jsonexport = require('jsonexport'); | |
const fs = require('fs').promises; | |
const path = require('path'); | |
const API_URL = process.env.API_URL; | |
const EMAIL = process.env.EMAIL; | |
const PASSWORD = process.env.PASSWORD; | |
const OUTPUT_PATH = process.env.OUTPUT_PATH; | |
const NAME = process.env.NAME; |
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
// /app/api/[...trpc]/route.ts | |
/** | |
"trpc-openapi": "^1.2.0", | |
"@trpc/client": "next", | |
"@trpc/next": "next", | |
"@trpc/react-query": "next", | |
"@trpc/server": "next", | |
**/ | |
import { createOpenApiNextHandler } from "trpc-openapi"; |