Skip to main content

Posts

Doctrine catchup migrations

Resetting Doctrine Migrations and Generating a Fresh Baseline Sometimes, after months of development, experiments, rebases, or multiple contributors, Doctrine migrations can become difficult to follow. You may end up with: Too many migration files Broken migration history Conflicts between branches Databases that are already in sync but migrations are not Old migrations that no longer represent reality In those situations, one practical solution is to completely reset the migration history and generate a brand new migration representing the current state of your entities. When Should You Do This? This approach is useful when: You are still in active development The project has not yet reached production You want to simplify migration history Your migration chain has become unreliable You want a clean baseline for future migrations Do not do this lightly on production systems with historical environments that depend ...
Recent posts

Remove SQL Comments

Remove SQL comments in SQL scripts I often want to provide SQL structure dumps as context for AI assisted development. But most of the dumps tools provide SQL scripts with comments. I do not want to provide them to the AI. So, I need to strip the comments. This is the file I use:   #!/bin/bash # 1. Check if an input file was provided if [ "$#" -lt 1 ]; then echo "Usage: $0 [output_file.sql]" exit 1 fi INPUT_FILE="$1" OUTPUT_FILE="${2:-cleaned_$1}" # 2. Check if input file exists if [ ! -f "$INPUT_FILE" ]; then echo "Error: File '$INPUT_FILE' not found!" exit 1 fi # 3. Create secure temporary files for the intermediate passes PASS1_FILE=$(mktemp) PASS2_FILE=$(mktemp) # Set a trap to automatically delete the temporary files when the script finishes or is aborted trap 'rm -f "$PASS1_FILE" "$PASS2_FILE"' EXIT echo "Starting multi-pass SQL cleanup on '$INPUT_FI...

Fedora rebuild NVidia drivers

  Rebuilding NVIDIA Drivers on Fedora After Updates If you’re running Fedora with NVIDIA proprietary drivers, you’ve probably run into this situation: screen does not work properly. The fix is simple, but easy to forget. This post is here so future-you (and others) don’t waste time rediscovering it. The Command You’re Looking For sudo akmods --rebuild --force That’s it. This command forces a rebuild of kernel modules managed by akmods , including NVIDIA drivers. When Should You Run It? Typically, you’ll need this after: A kernel upgrade An update of one of these packages: akmod-nvidia xorg-x11-drv-nvidia-cuda Why? Because NVIDIA drivers are built as kernel modules, and they must match your currently running kernel. When Fedora updates the kernel, the modules may not yet be compiled for it — or something may have gone wrong during automatic build. What’s Happening Under the Hood Fedora uses akmods (Automatic Kernel Module Build Service) to compile kernel mod...

Copilot CLI OpenCode

From GitHub Copilot CLI to OpenCode: A Pragmatic Take from a Pro+ User I’m a GitHub Copilot Pro+ subscriber, and I’ll start with this: I genuinely love the GitHub ecosystem . GitHub has shaped the way many of us work—code hosting, CI, issues, pull requests, and now AI-assisted development. Naturally, when GitHub released Copilot CLI , I decided to go all in. Betting on Copilot CLI as an Exclusive Coding Agent Despite its early preview status , I made a deliberate choice: Copilot CLI would be my exclusive coding agent . I wanted a CLI-first, first-party AI experience, tightly integrated with GitHub. I knowingly accepted the risks that come with preview software. Initially, the bet paid off. Contributing Back: When Feedback Turns into Features Early on, I proposed a small but important enhancement: a command to list available models . Issue: https://github.com/github/copilot-cli/issues/47 To my surprise (and appreciation), the idea was welcomed, discussed, and...

Fedora Proart Tips

I’ve been a Linux user for a long time, and historically my comfort zone has been “hands-on” distributions: Slackware, Gentoo, Debian, Arch Linux. I also virtualize heavily. I started back in the day with OpenVZ, then moved to VMware Workstation… until I got fed up with the constant “you must patch your kernel” routine to keep things working smoothly. Recently I got an Asus ProArt P16 (AMD Ryzen 9 + NVIDIA GPU). Great machine—until I tried to install my usual favorite Linux distributions. To my surprise, none of them handled the hardware properly (or at least not enough to reliably use the laptop day-to-day). I then tried Fedora 43 , and it immediately handled the basics out of the box — the minimum needed to actually use the system. After a bit more digging, I realized I needed to explicitly enable the NVIDIA dGPU. The fix was simple once you know it: supergfxctl --mode Hybrid Then came the “random Google search” moment: I searched for a Fedora derivative that would handle the...

LazyGit AI Commit Message

Having AI‑generated commit messages directly integrated into LazyGit If you use LazyGit every day, you already know how it turns Git from a chore into something you can actually enjoy. But there is one part of the workflow that still tends to feel a bit tedious: writing good commit messages. In this post, I show how to plug OpenAI models directly into LazyGit using a tiny one‑file BASH script, so you can get AI‑generated commit messages based on your actual diffs, without waiting for external tools to catch up with the new OpenAI Responses API . The result is a minimal, focused tool you can drop into your setup today: lgaicm . It behaves like a mini aichat that does exactly one thing: generate commit messages from Git diffs, optimized for LazyGit. Why AI‑generated commit messages in LazyGit? Commit messages matter. They are the stor...

Journey Samsung Devices

My Journey with Samsung Devices: From Galaxy S to the Ultra Era Over the years, smartphones have come and gone, but for me, one brand has defined more than a decade of my tech life — Samsung . It all started in 2010 . The Early Days: Galaxy S to Note 3 My first Samsung was the Galaxy S (2010) — the beginning of an era. It was sleek, fast, and years ahead of what other Android phones offered at the time.   In 2011 , I moved to the Galaxy S2 , the brown leather back edition . It felt premium — classy, even — and I remember thinking: this is what smartphones should feel like .   Then came 2012 , and I stepped into something new: the Galaxy Note 2 . I didn’t have the first Note, but the second one changed the game for me. The big screen, the stylus… it was productivity in your pocket. Unfortunately, it wasn’t waterproof (no “IP sixty-something” rating back then), and one sweaty day — literally — it died. In 2013 , I replaced it with the Note 3 , another fantastic upgrade. ...