Skip to content

Instantly share code, notes, and snippets.

View dir's full-sized avatar
making it happen

Luke Davis dir

making it happen
View GitHub Profile
@dir
dir / download-video.sh
Created February 3, 2025 02:28
Video Downloader (yt-dlp) Raycast Script Command
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Download Video
# @raycast.mode compact
# @raycast.packageName Media
# @raycast.argument1 { "type": "text", "placeholder": "URL", "percentEncoded": false }
# @raycast.argument2 { "type": "dropdown", "placeholder": "Format", "data": [{ "title": "Auto", "value": "auto" }, { "title": "MP4", "value": "mp4" }, { "title": "WebM", "value": "webm" }, { "title": "MKV", "value": "mkv" }, { "title": "FLV", "value": "flv" }, { "title": "AVI", "value": "avi" }, { "title": "M4A", "value": "m4a" }], "optional": true }
# @raycast.argument3 { "type": "text", "placeholder": "Output Path", "optional": true }
@dir
dir / convex.schema.json
Created December 15, 2024 22:44
Unofficial convex.json Schema
{
"$schema": "http://json-schema.org/draft-07/schema#",
"description": "Configuration schema for Convex project settings.\n\nDocumentation: https://docs.convex.dev/production/project-configuration#convexjson",
"type": "object",
"properties": {
"$schema": {
"type": "string"
},
"project": {
"type": "string",
@dir
dir / get-project-root.mjs
Last active October 17, 2024 21:42
Helper function to locate the project root path in a Node.js app, with implementations for both ECMAScript Modules (ESM) and CommonJS (CJS).
// ECMAScript (ESM)
// @ts-check
import { existsSync } from "node:fs";
import { parse, resolve } from "node:path";
import { cwd, env } from "node:process";
/**
* Finds and returns the root directory of the project.
*