Skip to content

Instantly share code, notes, and snippets.

View JosXa's full-sized avatar
💙

Joscha Götzer JosXa

💙
View GitHub Profile
import "@johnlindquist/kit"
import { startSpinner } from "@josxa/kit-utils"
import notifier from "node-notifier"
import { getKenvs } from "../../.kit"
export const metadata: Metadata = {
name: "Sync Kenvs",
description: "git add & commit & rebase & push safely",
schedule: "0 */12 * * *", // every 12 hours
}
// Name: Kill
// Description: Immediately terminates a Windows process using `taskkill /F /im <name.exe>`
// Keyword: kill
// Pass: /.*\.exe/gm
import "@johnlindquist/kit"
import { showError } from "@josxa/kit-utils"
import fkill from "fkill"
const cache = await db({ recents: ["node.exe"] as string[] })
import "@johnlindquist/kit"
import { showError } from "@josxa/kit-utils"
import { Octokit } from "@octokit/rest"
export const metadata: Metadata = {
name: "Roadmap Editor",
}
const token = await env("GITHUB_FULL_ACCESS_TOKEN")
// Name: Generate scripts.d.ts
// Description: Enables autocompletion for the `run` command
import "@johnlindquist/kit"
import { writeFile } from "node:fs/promises"
// Waaaatch: ~/.kit/db/scripts.json
if (args.length < 2) {
// Name: JSON to TypeScript
// Description: Convert some JSON to TypeScript models
import "@johnlindquist/kit"
import jsonToTS from "json-to-ts"
import { submitShortcut } from "@johnlindquist/kit/core/utils"
import { refreshable } from "@josxa/kit-utils"
import { crudArg } from "@josxa/kit-utils"
// Name: JSON to TypeScript
// Description: Convert some JSON to TypeScript models
import "@johnlindquist/kit"
import jsonToTS from "json-to-ts"
import { submitShortcut } from "@johnlindquist/kit/core/utils"
import { refreshable } from "@josxa/kit-utils"
import { crudArg } from "@josxa/kit-utils"
// Name: Get current Windows Explorer selection
import "@johnlindquist/kit"
import ffi from "ffi-napi"
import winax from "winax"
// Load user32.dll functions for window interaction using ffi-napi
const user32 = new ffi.Library("user32", {
GetForegroundWindow: ["long", []],
// Watch: ~/Downloads/*.{zip,7z}
import "@johnlindquist/kit"
import { extractArchive } from "../lib/sevenzip"
import "../lib/globals"
import fs from "node:fs"
import notifier from "node-notifier"
export const metadata: Metadata = {
// Name: Bookmarks
// Keyword: bm
import "@johnlindquist/kit"
import { join } from "path"
import type { Choice } from "@johnlindquist/kit"
import sqlite3 from "sqlite3"
import type { Bookmark, Folder, Root } from "../lib/models"
const SUPPORTED_BROWSERS = ["Chrome", "Vivaldi"] as const