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: 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[] }) |
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 "@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") |
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: 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) { |
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: 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" |
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: 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" |
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: 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", []], |
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
// 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 = { |
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: 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 |
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: Create Hardlink | |
import "@johnlindquist/kit" | |
import { basename, dirname } from "path" | |
import { rm } from "fs/promises" | |
export const sleep = async (timeMs: number) => await new Promise((resolve) => setTimeout(resolve, timeMs)) | |
const fromPath = await path({ hint: `Select a source file or folder to create a Hardlink to` }) |
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: 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") |