Skip to main content

Posts

Custom TMux configuration

This is how I configured my TMux The default TMux configuration misses two points I relly want: I need to be notified when I switch pane. More precisely: I switch pane with "Ctrl-b arrow", but sometimes I type it foo fast and it is not effective. So I need to know when it succeds (so I also know when it fails) I want more padding on pane name. It is too narrow for me. I need more space on the left and right side of the text! So, the configuration I made has the feature to blink when I switch pane, and put some right and left padding on pane names: # Enable focus events set-option -g focus-events on # Make the pane blink on focus set-hook -g pane-focus-in 'select-pane -P bg=colour247; run-shell "sleep 0.1"; select-pane -P bg=default;' set -g window-status-current-style "bg=grey,fg=black" set-option -g status-style "bg=black,fg=grey" set -g window-status-format ' #I:#W ' set -g window-status-curre...
Recent 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

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. Built-in functio...

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...