Skip to content

Instantly share code, notes, and snippets.

// Menu: Spongebob Mocking!
// Description: Copy, run and paste!
// Author: Ambushfall
// Shortcut: ctrl shift x
import '@johnlindquist/kit'
const str = await getSelectedText() || await clipboard.readText();
const splitStr = str.split(' ')
var newString = ''
// Preview: docs
// Menu: Open Project
// Description: Opens a project in vscode
// Shortcut: command shift .
import "@johnlindquist/kit";
import * as fs from "fs"
const envPath = await env('PROJECT_DIR');
// Name: Obsidian Helper
// Author: Ambushfall
import '@johnlindquist/kit'
import { Choice } from '@johnlindquist/kit'
import { readFileSync } from 'fs'
import _ from 'lodash'
let { obsidiandir, write } = await db('obsidiandir')
// Name: Obsidian Helper
// Author: Ambushfall
import '@johnlindquist/kit'
import { Choice } from '@johnlindquist/kit'
import { readFileSync } from 'fs'
import _ from 'lodash'
let { obsidiandir, write } = await db('obsidiandir')
// Name: OCR
// Description: Capture a screenshot and recognize the text using tesseract.js
import "@johnlindquist/kit";
//both win and linux implementations were created by chatgpt (gpt4), without _any_ tests!! 😅
const captureScreenshot = async () => {
const tmpFile = kenvTmpPath(`screenshot-${Date.now()}.png`);
const scriptFile = kenvTmpPath('script.ps1');
// Name: OCR
// Description: Capture a screenshot and recognize the text using tesseract.js
import "@johnlindquist/kit";
//both win and linux implementations were created by chatgpt (gpt4), without _any_ tests!! 😅
const captureScreenshot = async () => {
const tmpFile = kenvTmpPath(`screenshot-${Date.now()}.png`);
const scriptFile = kenvTmpPath('script.ps1');
// Name: Run .bat/.ps1/.sh
// Description: Process Output to Kit via stream
import '@johnlindquist/kit'
// @ts-expect-error
import { backToMainShortcut, highlightJavaScript } from '@johnlindquist/kit'
// --- Create a shell script to run -----------------
// `tmpPath` will store the file here:
// Preview: docs
// Menu: Open Project
// Description: Opens a project in vscode
// Shortcut: cmd shift .
import "@johnlindquist/kit";
const envPath = await env('PROJECT_DIR');
const projectDir = home(envPath);
import "@johnlindquist/kit"
// Menu: Search Anime
// Description: Use the jikan.moe API to search anime
// Author: John Lindquist, Updated by Ambushfall
let anime = await arg("Anime:")
let response = await get(
`https://api.jikan.moe/v4/anime?q=${anime}`
// Menu: Clipboard History
// Description: Copy something from the clipboard history
// Shortcut: command shift v
import "@johnlindquist/kit"
let { history } = await db("clipboard-history")
let { value, type } = await arg("What to paste?", () => {
return history.map(({ value, type, timestamp, secret }) => {