Ctrl K
Notes
All notes, grouped by topic. Everything assumes a Linux host.
92 results
Notebooks and Jupyter
Fix tqdm IProgress Warning in VS Code
Resolve the TqdmWarning: IProgress not found by upgrading jupyter, ipywidgets, and related packages.
Jupyter Notebook to HTML
Convert a Jupyter notebook to a clean HTML file with output only.
Register Jupyter Kernels
Register and list Jupyter kernels using venv
Local AI Stack
CUDA Setup on Ubuntu 24.04
Verify CUDA availability, install the CUDA Toolkit compiler (nvcc), configure environment variables, and confirm GPU access from Python.
Local Ollama API on Linux
Install Ollama, run it as a systemd service, pull models, and call the local API from curl and Python.
Local Text to Speech with XTTS v2
Set up Coqui XTTS v2 locally on GPU and turn a text script into a single-voice narration MP3, with sentence chunking for the 250 character limit.
Qdrant RAG Vector Index Workflow
Docker-based workflow for using Qdrant as a vector database in a RAG system, including manifest export, database source export, embedding execution, production deployment, and safe reindex checks.
AI Coding Agents
Claude Code Docker Setup
Run Claude Code inside a reusable Docker container, scoped to one mounted project with persistent subscription auth.
Hermes Docker Setup on Local Host
Run Hermes inside Docker on the local Arch host with persistent host data and a limited mounted workspace.
Hermes Local Device Setup
Set up Hermes on a separate local Ubuntu device, connect over SSH, manage sessions, and optionally expose a local dev site through a reverse tunnel.
Local Codex Agent Setup
Install Codex CLI on the Arch host, configure global and repo instructions, and start a local workspace-write coding session.
Multi Agent Worktree Docker Workflow
Use Git worktree slots, isolated Docker app containers, shared local infra, and normal GitHub PRs for parallel local agent work.
Editors and IDEs
C++ VS Code GCC CMake Setup
Initial C++ development setup on Ubuntu with GCC, CMake, GDB, Ninja, and VS Code.
Nano Usage
Keyboard shortcuts for multiline selection, cut and paste, and fast movement in long files in nano.
VS Code Note Markdown Viewer Extension
Create, package, install, and publish a small VS Code extension that opens .note.md files in a custom rendered Markdown viewer.
VS Code Workflow
Keyboard-driven VS Code workflow with a clean UI, visible editor tabs, Explorer navigation, and a small custom shortcut set.
VS Code Workspace Excludes
Hide generated folders from the VS Code Explorer and exclude them from search results.
Python
Multiple Python Versions on Ubuntu
Install several Python versions side by side on Ubuntu using the deadsnakes PPA, then create a venv pinned to a specific version.
Python Import Path and Package Checks
Debug Python import paths, regular packages, namespace packages, __init__.py behavior, and FastAPI backend import roots.
Node.js
Install NVM on Ubuntu
Install Node Version Manager on Ubuntu, then install and switch between Node.js versions per user without touching system packages.
Git
Discard Local Changes and Switch Branch
Steps to discard all tracked and untracked local changes, then switch to another branch.
Git Branches, Log, and Merge
View commit history, manage local and remote branches, pull new branches, and merge into main.
Git Init and First Push
Initialize a local repo, set the main branch, connect to a remote, and push for the first time.
Git Pull with Rebase
Fix a divergent main branch when the remote main changed and the local main also has an unpushed commit.
Git Workflow for Local Mirror Repositories
A fully local Git workflow using a bare .git directory as the central remote, with no dependency on any external hosting.
GitHub SSH Authentication for Local and EC2
Set up GitHub SSH authentication without repeated username and token prompts, using separate keys for local development and EC2.
GitHub SSH over Port 443
Fix 'ssh: connect to github.com port 22: Connection timed out' on networks that block port 22 by routing Git SSH through ssh.github.com on port 443.
Undo the Last Commit and Keep the Changes
Use git reset --mixed HEAD~1 to remove the last commit while keeping its changes in the working tree, ready to fix and re-commit.
Containers and Docker
Docker -f Flags: File vs Force
The -f flag means "file" in docker compose but "force" in docker rm: point compose at a non-default compose file, and force-remove running containers.
Docker and Wi-Fi Subnet Conflict
Fix a broken network where Docker's default 172.x bridge overlaps the Wi-Fi subnet, by pinning Docker to safe 10.x pools in daemon.json.
Docker Compose Daily Workflow
Docker Compose commands on a Linux host for starting, entering, inspecting, and stopping services.
Docker Compose Dev Workspace Setup
Development setup with Ubuntu based Docker containers for backend, frontend, Redis, MySQL, Celery worker, and Celery beat.
Docker Image and Container Mental Model
Understand Docker Hub, images, containers, tags, mounts, ports, startup commands, and common docker run flags.
Docker Resource Diagnostics and Cleanup
Check Linux memory, disk, Docker cache, containerd storage, and live CPU usage, then clean Docker safely on servers and local dev machines.
Render a Manim Scene with Docker
Render a Manim Community scene through the official Docker image, bind mounting the project so the output video lands locally.
SSH and Remote Access
Adding a New SSH Key to EC2
Add a new key pair to a running EC2 instance without losing existing access: key creation in AWS, local setup, public key extraction, and authorized_keys update.
Find Local Network IP
Find the IPv4 address of a Linux machine on the local network so another device can reach it over SSH.
Local SSH vs EC2: Reachability and Auth
Why a LAN device connects over SSH with just a password while EC2 needs a .pem key: reachability and authentication are separate, independent concerns.
Reach a Local Host by Name over SSH
Stop chasing a changing DHCP IP: reach a Linux host on the local network by a stable .local mDNS name or a DHCP reservation, and pick the right interface.
SSH into a Local Network Device
Connect from a Linux host to another device on the same local network over SSH, using a named host alias in ~/.ssh/config.
SSH into EC2 from Linux Host
Configure and connect to an AWS EC2 instance over SSH from a Linux host using a named host alias in ~/.ssh/config.
Transfer Files Between Machines with rsync over SSH
Move or copy folders between two Linux machines on the same network using SSH for the connection and rsync for the transfer, with a dry-run and verify step.
Server Deployment
Docker Compose Production Deploy on Ubuntu
End-to-end Docker Compose production deployment on an Ubuntu server: install Docker, run the stack, keep after reboots with systemd, and day-to-day rebuild flows.
EC2 Swap File Setup
Add a persistent swap file to a small EC2 instance so memory spikes degrade into a slowdown instead of a hard OOM freeze that kills SSH access.
n8n EC2 arXiv Radar
Deploy private n8n on EC2 with Docker Compose and build a daily arXiv research digest workflow delivered by email.
systemd and Nginx Fullstack Deployment
Deploy a Next.js frontend and FastAPI backend on Ubuntu with systemd, Redis, Celery, Nginx, and Cloudflare Origin Certificate SSL.
Cloud and Data Platforms
BigQuery to Cloud Storage Archive
Archive selected BigQuery tables to Cloud Storage as Parquet, then validate that the exports can be downloaded and read back.
Google Cloud SDK and Local BigQuery Setup
Install Google Cloud CLI globally on the host while keeping each client's gcloud config, Python venv, and BigQuery auth isolated per project.
Text to Speech with Amazon Polly and SSML
Generate single-voice narration MP3s from SSML using Amazon Polly neural voices, chunked by paragraph and concatenated with ffmpeg.
Upload Large Files to S3 with the AWS CLI
Upload multi-gigabyte files to S3 with the AWS CLI's parallel multipart upload instead of the browser console, and keep a long transfer alive.
Open Source Desktop Apps
Browser Setup and Shortcuts
Install Firefox, Chromium, and Google Chrome on Linux, understand when to use each one, and keep a practical set of Firefox shortcuts for keyboard-first usage.
LibreOffice Reference
Use LibreOffice on Arch Linux for writing documents, editing office files, opening PDFs visually, and exporting documents to PDF.
Social Media Dehook
Clean Up the LinkedIn Feed with uBlock Origin
Custom uBlock Origin filters that strip the LinkedIn feed down to real posts, removing promoted and suggested cards and the right-side puzzle and add-to-feed modules.
Programming Concepts
Semantic Versioning for Releases
Decide which part of a MAJOR.MINOR.PATCH version to bump on each release based on the kind of change, including the pre-1.0 rules and the one hard rule for publishing.
Arch Linux Setup
Arch ASUS Laptop Controls
Use asusctl and asusd for ASUS-specific laptop controls such as keyboard RGB and battery charge limits.
Arch Default Browser on KDE
Fix xdg-settings failing with 'qtpaths: command not found' and set Firefox as the system default browser on Arch Linux with KDE Plasma.
Arch Display Brightness and Night Mode
Manual brightness and blue light control for an Arch Linux i3 multi-monitor setup.
Arch Hibernate with Swapfile and UKI
Configure hibernate on Arch Linux with systemd-boot, UKI, encrypted root, zram, and an ext4 swapfile resume setup.
Arch LTS Kernel Boot Lifecycle
Install, expose, test, compare, and remove an Arch Linux LTS kernel path with systemd-boot and UKI entries.
Arch WiFi Printer Setup
Set up a WiFi printer on Arch Linux using CUPS with manual IP configuration and the Epson ESC/P-R driver.
Arch yay Install
yay is an AUR helper for installing packages not available in the official Arch repositories. Required for packages like Google Chrome.
Bluetooth Pairing with bluetoothctl
Pair and reconnect Bluetooth mice, keyboards, and headphones on a minimal Arch/i3 setup with bluez and bluetoothctl, without a GUI like Blueman.
X11 Screen Blanking and DPMS Control
Disable X11 screen blanking and DPMS display sleep to test idle display wake freezes.
Linux i3 Desktop
i3 Alt Mod Key on Arch
Switch i3 from the Super key to the Alt key on Arch by changing the i3 mod setting, fixing the X modifier map, loading Xmodmap from i3, and verifying the setup after reboot.
i3 Base Setup and Styling on Arch
Configure the core i3 desktop on Arch with Alacritty, Starship, Fastfetch, Picom, image wallpaper, screen layout shortcuts, clean i3status bar, and base shortcuts.
i3 Dev Mode with tmuxp
Create a reusable i3 development launcher that starts tmuxp sessions, prepares the screen and power mode, opens the main tmux workspace in Alacritty, and places browser and editor windows on separate workspaces.
i3 Laptop Lid Behavior on Arch
Configure systemd-logind lid behavior for laptop, plugged-in, docked, and external-display i3 workflows.
i3 Login with ly on Arch
Configure ly as a terminal-style display manager on Arch and make it start the i3 session by default.
i3 PipeWire Sound Checks on Arch
Check and fix common PipeWire sound issues in a minimal i3 session on Arch.
i3 Screen Layout Profiles with xrandr Refresh Rates
Create reusable xrandr screen layout profiles with explicit refresh rates for laptop-only, external-only, and mirror modes in an i3 setup.
i3 Screenshot Workflow with maim and xclip
Configure a simple selected-region screenshot shortcut in i3 using maim, slop, and xclip.
i3 Touchpad Scrolling on Arch
Configure natural scrolling, tap-to-click, and slower touchpad scrolling on Arch with i3, X11, and libinput.
Switch Keyboard Layout with setxkbmap
Manually switch the active keyboard layout in an i3/X11 session with setxkbmap, for example between US English and Turkish Q, with no shortcut or auto-switching.
Linux Shell and Terminal
Bash Aliases
Define persistent command shortcuts directly in ~/.bashrc and source them into your shell session.
Convert EPUB to PDF from the CLI
Convert an EPUB ebook to PDF with Calibre's ebook-convert command, including a denser textbook-style layout.
Convert M4B Audiobook to MP3
Convert an .m4b file to .mp3 with ffmpeg, keeping metadata and removing the video stream.
Linux Shell Line Editing Shortcuts
Common Bash and readline shortcuts for deleting, undoing, and moving through command-line text.
Running Scripts from the Current Directory
Why a bare script name fails with "command not found" and how to run a file with an explicit path like ./my-script.sh.
tmux Sessions, Windows, and Panes
Keyboard driven terminal tool for managing multiple contexts in parallel. Daily routine for sessions, windows, and panes.
Linux System Operations
Check Disk Usage and Storage
Check disk and partition usage, see the disk layout and filesystem types, and find which folders are consuming space with df, lsblk, du, and ncdu.
Docker Container Name Conflict
Resolve 'container name already in use' errors caused by leftover containers when docker compose up fails to recreate services.
GPU Monitoring
GPU utilization, memory, and process monitoring with nvidia-smi for one-shot or refreshed views, and nvtop for an interactive interface.
Linux Service Operations
Operate systemd services, Nginx configs, process IDs, journal logs, Docker logs, and cron jobs on Linux servers and Arch workstations.
Linux System Maintenance and Error Review
Review Linux system freezes and runtime failures, inspect previous boot logs, check driver and package state, and safely update an Arch Linux workstation.
Linux zram and Disk-Backed Swap
Identify zram-only swap, understand why zram cannot store a hibernation image, and configure a two-layer swap setup with zram for runtime paging and disk-backed swap for hibernate.
Port Already in Use
Find and kill the process using a port with PIDs.
Linux Virtual Machines
Arch Windows VM with KVM/QEMU
UEFI based Windows 11 virtual machine on an Arch Linux host using QEMU/KVM, libvirt, and virt-manager.
Disposable Linux Mint VM and USB File Transfer
Create a throwaway Linux Mint XFCE virtual machine on an Arch host with virt-manager and KVM, then move files out of the guest using a writable exFAT USB drive redirected into the VM.
Windows 11 VM on Ubuntu with KVM/QEMU
UEFI based Windows 11 virtual machine on an Ubuntu host using QEMU/KVM, libvirt, and virt-manager.
Linux Backup and Recovery
Encrypted Off-site Backup to S3
Keep a recoverable off-site copy of important machine state as a tar + zstd + age archive uploaded to S3, and restore it after a reinstall or hardware loss.
Restic Local Backup
Incremental snapshot backups of projects to a local backup drive using restic, with exclude rules for Linux development environments.
Restic Restore Test with External Drive
Validate a restic backup by restoring onto a clean external drive. Step by step disk preparation, restore execution, file verification, and safe unplug.
Social Media Dehook