Posts

Showing posts from 2025

Chatbot conversation

Fixing macOS Ghost Mount Points: How I Stopped “external 1” From Appearing Fixing macOS Ghost Mount Points: How I Stopped “external 1” From Appearing Date: November 16, 2025 Context I’m enforcing an external-only home directory on macOS. Sometimes, if the external disk isn’t present, macOS quietly creates a local folder at /Volumes/external to keep the session alive. Later, when I plug in the actual drive, the system avoids the collision by mounting it as external 1 . That silent behavior breaks my setup and creates confusion. Symptoms Mount collision: Real disk mounts as /Volumes/external 1 instead of /Volumes/external . Ghost folder: A plain directory exists at /Volumes/external without a device backing it. Recovery view: In Recovery Mode, internal volumes appear under /Volumes/Macintosh HD/Volumes/ . What worked: R...

Chatbot session

Reproducible Termux Logging: Session Export Made Modular Date: November 16, 2025 Focus: Capturing full terminal sessions in Termux with reusable shell wrappers Why this matters Today’s conversation explored how to make Termux sessions reproducible and exportable — not just for command output, but for full interactive transcripts. Whether you're debugging, documenting, or teaching, having a clean log of your terminal activity is essential. Core tools and techniques script : Captures full input/output of a session tee : Logs output while displaying it live history : Dumps command history for timeline reference Shell wrappers: Modularize logging with timestamped filenames Reusable shell function: dump_history This function captures your current working directory, user, shell, and command history into a timestamped file. dump_history() { ...

What “create .env.local (do not commit)” really means

What “create .env.local (do not commit)” really means If you’ve seen instructions like “create .env.local (do not commit)” in docs for frameworks like Next.js, React, or Node.js, here’s the clear, no-fluff breakdown of what to do, why it matters, and how to avoid leaking secrets. What is .env.local ? Local-only config: A file for environment variables that apply only on your machine (API keys, database URLs, toggles). Overrides: Values in .env.local typically override .env when running locally. Format: One KEY=VALUE per line, no quotes needed unless values contain spaces. API_KEY=12345abcdef DATABASE_URL=postgres://user:pass@localhost:5432/mydb FEATURE_FLAG=true Why “do not commit”? Secrets: It often contains sensitive info (API keys, passwords) that should never be public. Machine-specific: Your local paths or ports won’t match teammates or servers. Security hygiene: Keeping secrets out of git prevents accidental leaks and audi...

Listing USB from terminal

How to List USB Devices on macOS Using Terminal If you’ve ever plugged in a USB device on your Mac and wondered how to see what’s connected behind the scenes, you’re not alone. Whether you’re troubleshooting, verifying hardware, or just curious, macOS gives you several powerful command-line tools to list USB devices directly from the Terminal. 🔌 The Essential Commands Here are the most useful commands you can run: Detailed USB Report system_profiler SPUSBDataType This command provides a full breakdown of all connected USB devices, including vendor IDs, product IDs, and device details. Low-Level USB View ioreg -p IOUSB -l -w 0 For those who want a deeper, technical look, this command queries the I/O Registry and shows verbose information about each USB device. Mounted Disks (Including USB Storage) diskutil list While not USB-specific, this command lists all mounted disks, which is handy for identifying USB drives. ...