Skip to content

Instantly share code, notes, and snippets.

Gemini CLI is opensource, thus we can configure it to use with a custom model.

Gemini CLI

Install:

npm install -g @google/gemini-cli

Uninstall:

npm uninstall -g @google/gemini-cli

#!/usr/bin/env python3
"""
s.id URL Shortener CLI
Usage: python sid.py <command> [options]
Env vars required:
SID_AUTH_ID - your X-Auth-Id
SID_AUTH_KEY - your X-Auth-Key
"""
#!/usr/bin/env python3
"""
Digital Pali Dictionary TXT Parser Test
https://github.com/digitalpalidictionary/dpd-db/releases/download/v0.3.20260402/dpd-txt.zip
Parses a structured dictionary text file into JSON with HTML-formatted content.
"""
import re
import json
@vpnry
vpnry / hn_digest.py
Created April 10, 2026 15:33
Openclaw - Get top 20 HN News and Send to your Telegram
import requests, time, html
from datetime import datetime
from zoneinfo import ZoneInfo
from urllib.parse import urlparse
TELEGRAM_TOKEN = "bot token"
CHAT_ID = "Enter Telegram ID"
HN = "https://hacker-news.firebaseio.com/v0"
@vpnry
vpnry / a-wotd-custom-word-list.md
Created October 20, 2025 07:20 — forked from jsomers/a-wotd-custom-word-list.md
How to use a custom word list with OS X's "Word of the Day" screensaver

OS X's "Word of the Day" screensaver is a great way to passively learn words:

But I've always thought that its word list kind of stunk—it was full of obscure words that I could never really see myself using. I'd prefer something like Norman Schur's 1000 Most Important Words. What if you could plug your own word list into the screensaver?

On a rather obscure comment thread, someone explained where you might find the word list that Apple uses to power the screensaver. It is at /System/Library/Graphics/Quartz\ Composer\ Plug-Ins/WOTD.plugin/Contents/Resources/NOAD_wotd_list.txt. The file looks like this:

m_en_us1282510	quinsy
@vpnry
vpnry / translate_prompt.txt
Last active February 24, 2025 03:34
Prompt and script to prepare chunk for AI translation
Your role is a professional translator specializing in Theravada Buddhist texts, with expertise in translating from Sinhala into English. Your translations prioritize accuracy in conveying both the literal meaning and the deeper spiritual context of the original text. You strive to maintain the nuances and technical terminology specific to Theravada Buddhism while making the text accessible to English readers.
Your translation will be used in a book print. When translating, adhere to these guidelines:
- 1. Provide only the accurate translation of the input text without additional explanations or commentary.
- 2. Preserve important Sinhala Pali term in Roman script or other terms in transliteration when an exact English equivalent doesn't exist.
- 3. Maintain the tone and style of the original text as much as possible.
- 4. Maintain the original markdown format and preserve paragraph breaks and segments
- 5. Use consistent terminology throughout the translation, especially for key Buddhist concepts.
- 6. If
@vpnry
vpnry / rename_url_encodes.py
Created February 10, 2024 09:22
To rename files according to its parent dir name. Directory names are URL encoded
# rename files according to its parent dir name
# directory names are URL encoded
# generated with CHATGPT (tested)
import os
from urllib.parse import unquote
# Function to decode URL encoded folder names
def decode_folder_name(folder_name):
return unquote(folder_name)
@vpnry
vpnry / mms_text_to_speech.py
Created May 25, 2023 01:42
MMS speech fairseq TTS app
'''
Run with
PYTHONPATH=$PYTHONPATH:./fairseq/vits python3 app.py --model_dir LANG --file_path text.txt
LANG is your model language
'''
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
@vpnry
vpnry / nodejs_split_smaller_dict.js
Created April 1, 2023 18:38
nodejs split dictionary
const fs = require("fs");
const PARTS = 10;
// Load the original dictionary from a file
const DICTOBJ = require("./DICTOBJ.js");
// Split the keys into 4 roughly equal PARTS
const keys = Object.keys(DICTOBJ);
const chunkSize = Math.ceil(keys.length / PARTS);
const chunks = [];