Skip to content

sanand0/scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

103 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

These are personal productivity utilities that simplify my workflow on Windows (Cygwin) and Linux. These are in 2 places:

Type Location Windows Path Linux Path
Public GitHub C:\code\scripts\ ~/code/scripts/
Private Dropbox C:\Dropbox\scripts\ /c/Dropbox/scripts/

Note: I use /c/Dropbox as a symlink to C:\Dropbox in Cygwin to standardize scripts.

Common Setup

echo 'source ~/code/scripts/setup.fish' >> ~/.config/fish/config.fish
echo 'source ~/code/scripts/setup.bash' >> ~/.bashrc

See agents/ for setting up AI code editors.

Windows Setup

On an Admin command prompt, run:

CD /D C:\cygwin\home\Anand\
MKLINK /H .gitconfig C:\code\scripts\.gitconfig
MKLINK /D .ssh C:\Dropbox\scripts\.ssh
REM TODO: Set up `llm` keys.json on Windows

Disable inherited permissions, remove all permissions, and only add yourself with full permissions.

System setup

Here are the setup details for my laptops.

Scripts

  • ask records a short voice note, sends it to llm for custom action (transcribe, bash code, fish code, ...), copies to clipboard
  • askwin calls ask and pastes on window we called it from. Triggered by Ctrl + Alt + 0
  • audiosync.py syncs audio and video files using cross-correlation. Usage: uv run audiosync.py video.mkv audio.opus output.mkv. I use this to sync screen recordings via videorecord with phone audio recordings of better quality.
  • chars lists non-ASCII characters in files.
  • clean_markdown.py normalizes Markdown list spacing (removes extra blank lines inside lists while preserving paragraph breaks). Supports file, clipboard (--xclip), and self-tests (--test).
  • copy-to-markdown.sh converts clipboard rich text (HTML) to Markdown in clipboard. Usage: Ctrl + C, then Ctrl + Alt + C
  • dev.sh runs a development container for safer experimentation.
  • consolidate_transcripts.py aggregates lessons from my call transcript into a unified transcripts.md.
  • daydream fuses recalled concepts into radical ideas. Example: daydream -c llm -c oblique-strategies "web app"
  • discourse.py extracts recent posts from a Discourse category or topic.
  • gitget clones a git repository and copies specific paths to local directories.
  • git-uncommitted lists directories not git-synced with remote
  • githubscore.py evaluates GitHub developer quality
  • gmail: Gmail search CLI. Uses OAuth tokens from google_oauth.py
  • histfreq ranks the most common commands from a NUL-delimited shell history stream. history --null | uv run histfreq.py -n 40
  • mcpserver.py exposes an MCP server on localhost:8000 that lets LLMs run bash commands. Useful for ChatGPT to control your machine. Run in sandbox to reduce risk.
  • q is a terminal AI chat interface. q 'What is 2 + 2?' --llm chatgpt opens Google AI mode, asks the question, and prints the answer. q --m chatgpt 'What is 2 + 2?' does the same with ChatGPT.
  • recall shows a random note bullet. Example: recall or recall talks
  • rename_receipts.py renames PDF receipts to YYYY-MM-DD Service $0.00 Card-1234.pdf by extracting date, vendor, amount, and last-4 card details from invoice text.
  • rgb converts RGB to hex and vice versa.
  • rofi-files.sh and rofi-chrome-tabs.sh are used by rofi to get recent files. Triggered by Ctrl + Alt + F.
  • rofi-clip.sh opens a rofi clipboard transform menu (Markdown/Rich text/URL/date utilities), applies the selected transform, and writes back to clipboard. Triggered by Ctrl + Alt + M (since it's mostly Markdown related).
  • rofi-prompts.sh shows prompts from Markdown files in ~/code/blog/pages/prompts, lets you pick one via rofi, then copies/pastes the selected fenced code block. Triggered by Ctrl + Alt + P.
  • slide.py creates slides from Markdown files. Usage: uvx slide presentation.md
  • touchegg.conf is my touchpad gesture config for Touchegg on Ubuntu.
    • Global Gestures (Application: All)
      • Swipe Up 4 fingers: Increase volume 5%
      • Swipe Down 4 fingers: Decrease volume 5%
      • Swipe Left/Right 4 fingers: Pause / Play on VLC
      • Tap 2 fingers: Right mouse click (Button 3) on gesture begin.
      • Tap 3 fingers: Middle mouse click (Button 2) on gesture begin.
    • Application: microsoft-edge
      • Pinch Out 2 fingers: Zoom In
      • Pinch In 2 fingers: Zoom Out
      • Swipe Left 3 fingers: Back
      • Swipe Right 3 fingers: Forward
  • unbrace.js unwraps single-statement JavaScript blocks.
  • update-files caches directory listings so rofi-files.sh can stay fast even on large mounts.
  • viz.py embeds CSV files a HTML templates. This is the script that started Gramener in 2011.

AI coding agent scripts

  • codexlog.jq converts Codex CLI session logs to Markdown (from ~/.codex/sessions/yyyy/mm/dd/session.jsonl)
  • claudelog lists Claude Code sessions and converts to Markdown (from ~/.claude/projects/). uvx claude-code-log@latest --tui does a good job too.
  • copilotlog.jq converts GitHub session logs to Markdown (from ~/.copilot/session-state/*.jsonl)
  • opencodelog.jq converts OpenCode session logs to Markdown (from opencode export sessionID)

jq scripts

Others

  • generate/ has scripts to generate data.
  • pdbhook/ runs Python debugger on error. Usage: PYTHONPATH=~/code/scripts/pdbhook uv run script.py

Services

services/ has systemd services that are installed by services/setup.sh. Current services are:

  • consolidate-transcripts-daily.*: Consolidate transcript learnings
  • trending-repo-weekly.*: Update trending GitHub repos
  • update-files-daily.*: Update local files
  • update-files-weekly.*: Update mounted files

About

Setup instructions for my Windows / Linux machines, as well as a collection of my dotfiles and productivity scripts

Topics

Resources

Stars

Watchers

Forks

Contributors