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
export const cohortProductFieldsSchema = z.object({ | |
// Defaults | |
body: z.string().nullable().optional(), | |
description: z.string().optional(), | |
slug: z.string(), | |
state: ResourceStateSchema.default('draft'), | |
visibility: ResourceVisibilitySchema.default('unlisted'), | |
type: z.literal('live'), | |
// Cohort Details |
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 ResizablePanels from '../_components/resizable-panels' | |
import {cookies} from 'next/headers' | |
const EditorLayout = () => { | |
const defaultLayout = getDefaultLayout() | |
return ( | |
<div className="flex h-full flex-grow flex-col"> | |
<ResizablePanels defaultLayout={defaultLayout} /> | |
</div> | |
) |
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
// Name: Watch Screenshots Dir | |
// Watch: ~/Desktop/screenshots | |
// Description: Don't forget to run following command in your terminal to set default screenshot directory in macOSX: defaults write com.apple.screencapture location ~/Desktop/screenshots | |
import "@johnlindquist/kit"; | |
import cloudinary from "cloudinary"; | |
import trash from "trash"; | |
const DIR = "screenshots"; | |
const NOTIFY_SOUND_FILE_PATH = false; // home("Desktop/come-here-notification.mp3"); |
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
// Menu: Record Screen | |
// Shortcut: shift cmd 5 | |
/** @type {import("@johnlindquist/kit")} */ | |
await applescript(` | |
-- # Setup to do a screen recording. | |
# tell application "QuickTime Player" to new screen recording |
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 {Button} from '@package/ui/button' | |
import {ThemeProvider} from '@package/ui/use-theme' | |
import {appUniqueTheme} from './theme' | |
const Page = () => { | |
return ( | |
<ThemeProvider theme={appUniqueTheme} /> | |
<Button /> | |
</ThemeProvider> | |
) |
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
// Menu: Tinify | |
// Description: Compress selected images with Tinify | |
// Author: Vojta Holik | |
// Twitter: @vjthlk | |
let tinify = await npm("tinify"); | |
let fs = await import("fs"); | |
let selectedFiles = await getSelectedFile(); | |
tinify.key = await env("TINIFY_API_KEY", { |
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 {publicProcedure, router} from '@skillrecordings/skill-lesson' | |
import {isEmpty} from 'lodash' | |
import {getToken} from 'next-auth/jwt' | |
import {getSubscriberFromCookie} from '@skillrecordings/skill-lesson/utils/ck-subscriber-from-cookie' | |
export const offerRouter = router({ | |
getNextOffer: publicProcedure.query(async ({ctx}) => { | |
const token = await getToken({req: ctx.req}) | |
const subscriber = await getSubscriberFromCookie(ctx.req) |
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
// Name: Markdown to Portable Text | |
/** @type {import("@johnlindquist/kit")} */ | |
const { markdownToRichText } = await npm("@tryfabric/martian"); | |
const showdown = await npm("showdown"); | |
const input = await getSelectedText(); | |
const output = markdownToRichText(input); | |
const converter = new showdown.Converter(); | |
const html = converter.makeHtml(input, { |
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
<!doctype html> | |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office"> | |
<head> | |
<title> | |
Email Course (1) The Start to Understanding Internet | |
</title> | |
<!--[if !mso]><!--> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<!--<![endif]--> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
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 "@johnlindquist/kit" | |
// Menu: App Launcher | |
// Description: Search for an app then launch it | |
// Author: John Lindquist | |
// Twitter: @johnlindquist | |
let createChoices = async () => { | |
let apps = await fileSearch("", { | |
onlyin: "/", |
NewerOlder