Skip to content

Instantly share code, notes, and snippets.

View pedramamini's full-sized avatar
👋

Pedram Amini pedramamini

👋
View GitHub Profile
@pedramamini
pedramamini / README.md
Last active April 24, 2026 21:21
Apple Voice Memos → daily Markdown journal. Pulls Apple's native on-device transcripts from the tsrp MP4 atom (no Whisper). Hourly cron-safe, idempotent. macOS 15+.

Voice Memos → Daily Markdown Journal (macOS)

Append today's Apple Voice Memos — transcribed by Apple on-device, no Whisper — to a daily Markdown journal file. Works great with Obsidian vaults, plain-text journals, any daily-note workflow.

From the iOS lock-screen long-press Voice Memos shortcut, a thought goes from "open mouth" to "stored, transcribed, titled, appended to today's note" with zero further input.

Read the writeup: Voice Memos to Journal, via a Buried Apple Atom — explains the tsrp atom discovery and why scanning for the JSON sentinel works across both .m4a and .qta container formats.


@pedramamini
pedramamini / youtube_to_obsidian.sh
Created April 21, 2026 17:55
YouTube ingestion to Obsidian with custom Fabric prompts
#!/bin/bash
# Do we want to ingest the videos into our vault?
DOWNLOAD_VIDEOS=false
# NOTE: THERE ARE CUSTOM FABRIC PATTERNS IN USE BELOW.
# /Users/pedram/go/bin/fabric --model gpt-4o --pattern ped_sitrep
# THIS SCRIPT WILL NOT WORK FOR YOU. IT'S BUT AN EXAMPLE.
# Ensure we're running in the directory where this script is located
@pedramamini
pedramamini / rocky_say
Last active April 30, 2026 11:31
rocky_say — Rocky voice TTS from Project Hail Mary (voice cloning + text style transform)
#!/usr/bin/env python3
"""
rocky_say — Text-to-speech using Rocky's cloned voice (Project Hail Mary)
Transforms input text into Rocky's speech patterns ("text GAN"), then
synthesizes audio using XTTS v2 voice cloning. Rocky is the Eridian alien
from Andy Weir's Project Hail Mary, voiced by James Ortiz in the 2026 film.
His speech patterns are distinctive: dropped articles, simplified grammar,
word tripling for emphasis ("good good good", "bad bad bad"), and the
@pedramamini
pedramamini / rssidian-cost-tracking.md
Created February 25, 2026 22:02
Obsidian cost tracking code for RSSidian ingestions.
searchType: dvField,dvField,dvField              # all three come from inline fields
searchTarget: Ingestion_Date,Total_Tokens,Total_Cost
datasetName: Date,Tokens,Cost ($)
aspectRatio: 50:15
folder: "Content Farm/Web/Archive/2025"
dateFormat: YYYY-MM-DD
xDataset: 0                                       # 1st target drives the X-axis

line:
@pedramamini
pedramamini / Oura_Stats_Obsidian.js
Created February 13, 2026 02:26
I pull stats into Oura regularly (manual unfortunately) then generate a table with different lookback windows via this DataViewJS snippet.
/********************************************************************
* Oura Stats + Regression‑based Trend & Δ % *
* – zebra‑striped rows for easier scanning *
********************************************************************/
/* ---------- helpers ---------- */
function fmtNum(n, d = 0) { return n.toFixed(d).replace(/\B(?=(\d{3})+(?!\d))/g, ","); }
function fmtDate(s) { const [y, m, d] = s.split("-"); return `${parseInt(m)}/${parseInt(d)}`; }
function linReg(x, y) {
const n = x.length,

Maestro - Statement of Work

Project Overview

Maestro is an open-source Electron desktop application for managing multiple AI coding assistants simultaneously. We're seeking an experienced Electron developer to help mature the codebase and establish infrastructure for sustainable, rapid development.


Scope of Work

Feature: Show Thinking Toggle

A simple toggle button in the AI terminal (bottom right of chat, alongside History and Read-Only) that lets users see Claude's thinking process as it streams, instead of waiting for the final result.

Overview

Current Behavior: Maestro waits for the complete type: 'result' message from Claude Code's stream-json output. The type: 'assistant' streaming chunks are explicitly skipped (see process-manager.ts:319-327). Users see only the final polished response.

New Behavior: When "Show Thinking" is enabled, users see the agent's response as it streams in real-time, giving visibility into reasoning before the final result arrives.

@pedramamini
pedramamini / ytt
Created August 20, 2025 17:21
Pull a transcript from YouTube or fall back to local transcription.
#!/bin/bash
# YouTube Transcript Tool (ytt)
# Extracts transcripts from YouTube videos using built-in transcripts or local transcription
url="$1"
if [[ -z "$url" ]]; then
echo "Usage: ytt <youtube-url>"
echo "Extract transcript from YouTube video using built-in transcripts or whisperkit-cli fallback"
// This is the legend code. Add this after your existing table code.

// Add custom CSS for the legend
const legendCSS = `
<style>
    .legend-container {
        text-align: right;
        margin-top: 10px;
 font-size: 0.9em;
@pedramamini
pedramamini / json-structure.py
Last active June 14, 2025 18:49
JSON Structure Analyzer and Reducer
#!/usr/bin/env python3
"""
JSON Structure Analyzer and Reducer
===================================
A powerful command-line tool for analyzing, reducing, and exploring JSON file structures.
Designed to help developers understand large JSON datasets by providing multiple modes
of interaction: structure reduction for LLM analysis, hierarchical size analysis, and
interactive terminal-based exploration.