| name | chatgpt |
|---|---|
| description | Use for chatgpt.com/share/* URLs. |
Run, then read emitted Markdown:
uv run --with requests --with beautifulsoup4 \
'https://raw.githubusercontent.com/vl3c/ChatPeek/master/ChatPeek.py' \| name | chatgpt |
|---|---|
| description | Use for chatgpt.com/share/* URLs. |
Run, then read emitted Markdown:
uv run --with requests --with beautifulsoup4 \
'https://raw.githubusercontent.com/vl3c/ChatPeek/master/ChatPeek.py' \| #!/usr/bin/env bun | |
| import { $ } from "bun"; | |
| interface CaptionFormat { | |
| ext?: string; | |
| url?: string; | |
| name?: string; | |
| } |
| #!/usr/bin/env bun | |
| import { $ } from "bun"; | |
| const prompt = | |
| "Generate a concise Git commit message for the staged diff. Plain text only. Imperative subject; body only if useful."; | |
| async function main(): Promise<0 | 1> { | |
| await $`git add -A -- .`; |
| #!/usr/bin/env bun | |
| /** | |
| * Downloads media audio with yt-dlp, transcribes it with FluidAudio CLI, and | |
| * prints the transcript to stdout. | |
| * | |
| * Requirements: | |
| * - yt-dlp: https://github.com/yt-dlp/yt-dlp/ | |
| * - FluidAudio CLI: https://github.com/FluidInference/FluidAudio/blob/main/Documentation/CLI.md | |
| * - Cookies under ~/.yt-dlp/ when transcribing auth-protected sites |
| name | |
|---|---|
| description | Use when encountering https://x.com/<path> URLs |
Instead of https://x.com/<path>, fetch:
curl -L 'https://nitter.tiekoetter.com/<path>'| #!/usr/bin/env bun | |
| const timeoutMs = 5_000; | |
| const sources = ["https://ipv4.icanhazip.com", "https://2ip.ru"] as const; | |
| const results = await Promise.all( | |
| sources.map((url) => | |
| fetch(url, { | |
| headers: { "User-Agent": "curl/8.0.0" }, |
| type Comparable = number | string | Date | boolean | bigint | |
| type CompareOp = "<" | ">" | "<=" | ">=" | "===" | "!==" | |
| const compareFns: Readonly< | |
| Record<CompareOp, <T extends Comparable>(a: T, b: T) => boolean> | |
| > = { | |
| "<": (a, b) => a < b, | |
| "<=": (a, b) => a <= b, | |
| ">": (a, b) => a > b, |
| package lib.xml | |
| import org.apache.commons.text.StringEscapeUtils | |
| fun StringBuilder.put(attrs: Array<out Pair<String, Any?>>) { | |
| for ((k, v) in attrs) { | |
| if (v == null) continue | |
| append(' ') | |
| append(k) |
| const productContainer = document.querySelector('div[data-qa-locator="general-products"]'); | |
| const sortedEls = Array.from(productContainer.children) | |
| .flatMap(product => { | |
| const salesInfo = product.querySelector('._1cEkb'); | |
| if (!salesInfo) return []; | |
| const salesText = salesInfo.innerText; | |
| const [soldStr] = salesText.split(' ') | |
| const salesCount = parseInt(soldStr.replace(",", "")); |