Skip to content

Instantly share code, notes, and snippets.

View JosXa's full-sized avatar
💙

Joscha Götzer JosXa

💙
View GitHub Profile
// Name: Cron Expression Validator
// Description: Validates and helps you build Crontab expressions
// Shortcode: cron
// Author: @JosXa, loosely based on Ricardo Gonçalves Bassete's version
import "@johnlindquist/kit"
import { computed, effect, signal } from "@preact/signals-core"
import cronstrue from "cronstrue"
import { markdownTable } from "markdown-table"
// Name: Cron Expression Validator
// Description: Validates and helps you build Crontab expressions
// Shortcode: cron
// Author: @JosXa, loosely based on Ricardo Gonçalves Bassete's version
import "@johnlindquist/kit"
import { computed, effect, signal } from "@preact/signals-core"
import cronstrue from "cronstrue"
import { markdownTable } from "markdown-table"
// Name: Cron Expression Validator
// Description: Validates and helps you build Crontab expressions
// Shortcode: cron
// Author: @JosXa, loosely based on Ricardo Gonçalves Bassete's version
import "@johnlindquist/kit"
import { computed, effect, signal } from "@preact/signals-core"
import cronstrue from "cronstrue"
import { markdownTable } from "markdown-table"
// Name: Cron Expression Validator
// Description: Validates and helps you build Crontab expressions
// Shortcode: cron
// Author: @JosXa, loosely based on Ricardo Gonçalves Bassete's version
import "@johnlindquist/kit"
import { computed, effect, signal } from "@preact/signals-core"
import cronstrue from "cronstrue"
import { markdownTable } from "markdown-table"
// Name: Cron Expression Validator
// Description: Validates and helps you build Crontab expressions
// Shortcode: cron
// Author: @JosXa
import "@johnlindquist/kit"
import { computed, effect, signal } from "@preact/signals-core"
import cronstrue from "cronstrue"
import { markdownTable } from "markdown-table"
// Name: Metadata Parser
import "@johnlindquist/kit"
import { Parser } from "acorn"
import tsPlugin from "acorn-typescript"
export interface Metadata {
/**
* Specifies the name of the script as it appears in the Script Kit interface.
// Name: Urban Dictionary
// Keyword: ud
import "@johnlindquist/kit"
import type { Choice } from "@johnlindquist/kit"
import { DateTime } from "luxon"
import { escapeHTML } from "../../.kit/core/utils"
await setInput("")
// Name: Generate scripts.d.ts
// Description: Enables autocompletion for the `run` command
import "@johnlindquist/kit"
import { writeFile } from "node:fs/promises"
const scripts = await getScripts()
const availableScripts = scripts.map((x) => ` | "${x.command}"`).join("\n")
// Name: Edit global .gitignore
// Description: Opens an editor with the global .gitignore file and sets it up if it doesn't exist
import "@johnlindquist/kit"
import { writeFile } from "node:fs/promises"
import { startSpinner } from "@josxa/kit-utils"
const cache = await db({ defaultEntries: [] as string[] })
const DESIRED_IGNORE_PATH = home(".global.gitignore")
// Name: Edit global .gitignore
// Description: Opens an editor with the global .gitignore file and sets it up if it doesn't exist
import "@johnlindquist/kit"
import "../lib/globals"
import { writeFile } from "node:fs/promises"
import { startSpinner } from "@josxa/kit-utils"
const cache = await db({ defaultEntries: [] as string[] })