Skip to main content

Posts

My Git Configuration

My simple user level Git configuration Default configuration is even fine for me. But among the default configuration, I sometimes use "meld" as "difftool" and "mergetool". This is what I put in the configuration for that purpose: [user] email = mihamina@rktmb.org name = Mihamina [difftool] prompt = false [difftool "meld"] trustExitCode = true cmd = meld "$LOCAL" "$REMOTE" [diff] tool = meld [mergetool] prompt = false [mergetool "meld"] trustExitCode = true cmd = meld --auto-merge "$LOCAL" "$BASE" "$REMOTE" --output "$MERGED" [merge] tool = meld
Recent posts

CopilotChat GlobFile Configuration

CopilotChat GlobFile Configuration Want to feed multiple files into GitHub Copilot Chat from Neovim without listing each one manually? Let's add a tiny feature that does exactly that: a file glob that includes full file contents . In this post, we'll walk through what CopilotChat.nvim offers out of the box, why the missing piece matters, and how to implement a custom #file_glob:<pattern> function to include the contents of all files matching a glob. Using Copilot Chat with Neovim CopilotChat.nvim brings GitHub Copilot's chat right into your editing flow. No context switching, no browser hopping — just type your prompt in a Neovim buffer and let the AI help you refactor code, write tests, or explain tricky functions. You can open the chat (for example) with a command like :CopilotChat , then provide extra context using built-in functions. That “extra context” is where the magic really happens. ...

Asterisk Python Module Pyst

Using the Asterisk Python Module "Pyst" The Asterisk Python module "Pyst" provides a simplified way to interact with Asterisk, an open-source framework for building communications applications, including VoIP gateways, conference servers, and more. "Pyst" enables Python developers to automate and manage Asterisk functionalities, integrating them into Python-based applications. This document explores the history, features, and usage of the Pyst module. There was pyst2, then pyst3, and now it is pyst. The Short History The evolution of the Pyst module reflects the broader transition within the Python ecosystem from Python 2 to Python 3: Pyst2 : Initially, Pyst was developed to work with Python 2, leveraging its capabilities to connect and control Asterisk servers. Its initial iterations aimed at providing basic functionalities like call initiation, monitoring, and terminations. Pyst3 : With the advent of Python 3, "Pyst2" was updated and r...

Symfony test API

Testing Symfony APIs Effectively with PHPUnit When it comes to building and maintaining reliable web APIs, testing isn't just a bonus, it's essential. In the Symfony ecosystem, PHPUnit is the tool of choice, providing developers with the means for ensuring their APIs are robust, secure, and reliable. Today, we'll explore the best practices and nuances around testing Symfony APIs using PHPUnit—both from the unit test perspective at the method level and endpoint-level testing for API-only Symfony projects. Understanding Method-Level Unit Tests in Symfony Unit tests are the cornerstone of ensuring code quality. These tests typically are small, quick, and targeted exactly at the method you're writing. They validate isolated parts of your application, and Symfony encourages this style of isolated, efficient testing. Let's look at a concise example. Suppose we have a simple helper method within a service that calculates discounts: name...

Neovim Yank Filename

How to Yank the Buffer File Name in Neovim to Your Clipboard How to Yank the Buffer File Name in Neovim to Your Clipboard Hi there! If you're a Neovim user like me and you frequently use AI-powered plugins like code-ai.nvim , you probably find yourself needing to yank file names into prompts or chats pretty often. The Problem: Jumping Back and Forth to Yank File Names When using code AI or other plugins to enhance your workflow, you might often need the exact filename—or path—of the buffer you're currently editing. Yanking file paths or names seems trivial at first, but it can quickly become cumbersome. Not to mention distracting. Typically, you’d have to exit Neovim or switch to another shell window just to remember the exact file or path you're editing. Needless to say, this interrupts the smooth workflow that makes using Neovim enjoyable in the first place. The Solution: Neovim Keybindings to the Rescue! I grew tired of having to pause my workfl...

LLM System Instructions

Finding the Perfect "System Instructions" for Your LLM-Enhanced Codebase Workflow Hey developers! Today, let's dive into something that many of us face when using Large Language Models (LLMs) in our coding workflow — how to craft the perfect "system instructions" so your LLM can seamlessly assist you with your codebase. If you're like me, you've probably experimented with tools integrating AI capabilities in your workflow. Personally, I built a custom Neovim plugin called code-ai.nvim , designed especially to help me interact with LLMs efficiently. The plugin scans relevant files, bundles them with clear instructions, and sends everything neatly to the LLM. Cool, right? My Neovim Plugin: code-ai.nvim code-ai.nvim was built with a simple yet powerful objective: automate file scanning and sending clear context plus instructions straight to an LLM assistant. It helps me navigate large and complex codebases, quickly pinpoint bugs, refactor legac...

blackscreen mesa xf86-video-vmware

Solving the Blackscreen Issue Caused by Mesa and xf86-video-vmware Drivers on Arch Linux Arch Linux is loved for its bleeding-edge freshness, supplying you with the latest packages and newest features. But occasionally, this freshness can trigger unexpected issues. Recently, I stumbled into one such scenario—a typical system upgrade caused the dreaded black screen of despair upon booting! After some research, I traced it back to specific driver packages: Mesa and xf86-video-vmware . In this post, I'll guide you through what exactly happened, how the Arch community responded to it, and how I temporarily solved it by preventing these packages from updating. The Black Screen After "pacman -Syu" Like any typical Arch user, I ran the routine command to update my system: sudo pacman -Syu The command completed successfully, and I rebooted confidently. Unfortunately, confidence quickly turned into panic when I was welcomed by an entirely black screen. I initially tho...