Pathaction | A universal Makefile for any file in the filesystem: Rule-driven commands for any file or directory

The pathaction tool is a flexible command-line utility for running commands on files and directories. Pass a file path as an argument, and the tool handles the rest, whether you are working with code, media, or configurations. Think of pathaction like a Makefile for any file or directory in the filesystem. It uses a .pathaction.yaml file to determine which command to run, and you can use Jinja2 templating to make those commands dynamic. You can also use tags to define multiple actions for the exact same file type. For example, you can set up one tag to run a script, … Continue reading

bash-stdops - A collection of Bash helper scripts that facilitate operations

The bash-stdops project is a collection of helpful Bash scripts, written by James Cherti, that simplify various operations, including file searching, text replacement, and content modification. The author uses these scripts in conjunction with text editors like Emacs and Vim to automate tasks, including managing Tmux sessions, replacing text across a Git repository, securely copying and pasting from the clipboard by prompting the user before executing commands in Tmux, fix permissions, among other operations. Install bash-stdops scripts System-wide installation To install bash-stdops scripts system-wide, use the following command: git clone https://github.com/jamescherti/bash-stdops cd bash-stdops sudo ./make.sh install Alternative installation: Install in … Continue reading

flymake-bashate.el - An Emacs Flymake backend for bashate

The flymake-bashate Emacs package provides a Flymake backend for bashate, enabling real-time style checking for Bash shell scripts within Emacs. (This package can also work with Flycheck: simply use the flymake-flycheck package, which allows any Emacs Flymake backend to function as a Flycheck checker.) If this enhances your workflow, please show your support by ⭐ starring flymake-bashate.el on GitHub to help more Emacs users discover its benefits. Installation To install flymake-bashate from MELPA: If you haven't already done so, add MELPA repository to your Emacs configuration. Add the following code to your Emacs init file to install flymake-bashate from MELPA: … Continue reading

enhanced-evil-paredit.el - Prevent Parenthesis Imbalance when Using Evil-mode with Paredit

The enhanced-evil-paredit package prevents parenthesis imbalance when using evil-mode with paredit. It intercepts evil-mode commands such as delete, change, and paste, blocking their execution if they would break the parenthetical structure. This guarantees that your Lisp code remains syntactically correct while retaining the editing features of evil-mode. If this enhances your workflow, please show your support by ⭐ starring enhanced-evil-paredit-mode on GitHub to help more Emacs users discover its benefits. Installation To install enhanced-evil-paredit from MELPA: If you haven't already done so, add MELPA repository to your Emacs configuration. Add the following code to the Emacs init file to install … Continue reading

flymake-ansible-lint.el - An Emacs Emacs Flymake backend for ansible-lint

The flymake-ansible-lint package provides a Flymake backend for ansible-lint, enabling real-time syntax and style checking for Ansible playbooks and roles within Emacs. (This package can also work with Flycheck: simply use the flymake-flycheck package, which allows any Emacs Flymake backend to function as a Flycheck checker.) Requirements ansible-lint >= 1.0.7 Installation To install flymake-ansible-lint from MELPA: If you haven't already done so, add MELPA repository to your Emacs configuration. Add the following code to your Emacs init file to install flymake-ansible-lint from MELPA: (use-package flymake-ansible-lint :commands flymake-ansible-lint-setup :hook (((yaml-ts-mode yaml-mode) . flymake-ansible-lint-setup) ((yaml-ts-mode yaml-mode) . flymake-mode))) Customizations You can configure … Continue reading

quick-fasd.el - Integrate Fasd for fast file and directory navigation in Emacs

The quick-fasd Emacs package integrates the Fasd tool into the Emacs environment. Fasd is a command-line utility that provides fast access to frequently used files and directories. After installing quick-fasd and enabling quick-fasd-mode: All visited files and directories are automatically added to the Fasd database. The quick-fasd-find-path function prompts for input and presents candidates from the Fasd index. (For example, recently accessed files can be opened, and frequently used directories can be visited without leaving Emacs.) When invoked from the minibuffer, quick-fasd-find-path appends the selected path, simplifying completion. If this package improves the workflow, consider supporting the project by ⭐ … Continue reading

pre-commit-elisp - Emacs Lisp (Elisp) Git pre-commit hooks

The pre-commit-elisp repository offers pre-commit hooks for Emacs Lisp (Elisp) projects. These hooks enforce code quality and consistency by performing automated checks on .el files prior to committing changes: elisp-check-parens: Validates that all parentheses in .el files are correctly balanced. elisp-check-byte-compile: Byte-compile Elisp files to detect compilation errors. elisp-check-native-compile: Native-compile Elisp files to detect compilation errors. elisp-indent: Indent Elisp files according to Emacs Lisp style conventions. These pre-commit hooks enforce syntactic correctness, successful byte-compilation, and consistent code formatting, ensuring a high standard of code quality and maintainability throughout the repository. If this enhances your workflow, please show your support by … Continue reading

Using Emacs vc-diff with tools such as git-crypt or Rails credentials: Handling Binary Diff Issues

Tools like git-crypt or Rails credentials provide an encryption layer for managing sensitive files within Git repositories. However, when using Emacs vc-diff on repositories protected by these tools, the diff output is incorrect because vc-diff compares the encrypted binary files directly rather than comparing the decrypted files. This occurs even when the repository is unlocked and the decrypted content is available, resulting in a failure to display meaningful diffs. The root cause Internally, vc-diff uses Git commands to compute diffs. However, it does not invoke them with the --textconv flag by default. Without --textconv, Git does not apply content filters, … Continue reading

13 Useful GNOME Shell Extensions for a Better Desktop Experience (Available in the official Debian repositories or on the GNOME Extensions website for other distributions)

GNOME Shell offers a clean and modern UI, but it often lacks functionality desired by power users and those coming from other desktop environments. GNOME Shell extensions provide a way to restore or add features to your desktop. In this article, you’ll explore some of the most useful GNOME Shell extensions available directly from the official Debian repositories via apt (available in Debian Bookworm and newer). For users running distributions other than Debian, this article provides a link to the GNOME Shell Extensions page for each extension, allowing installation on any supported distribution. Extension Management The GNOME Shell Extension Prefs … Continue reading

Installing Arch Linux onto a separate partition from an existing Debian-based distribution (Ubuntu, Debian, Linux Mint...), without using the Arch Linux installation media

Installing Arch Linux typically begins with booting from official installation media. However, it is also possible to bootstrap an Arch Linux installation from within a running Debian-based system (Ubuntu, Debian, Linux Mint, etc.). This method is advantageous in environments where rebooting into live media is impractical or when remote installation is desired. This article outlines a workflow for installing Arch Linux from a Debian-based system using pacman, pacstrap, arch-chroot, and pacman-key. Prerequisites Ensure your Debian system has the necessary tools to begin the installation process: This command installs the Arch Linux bootstrap tools, makepkg, the pacman package manager, and required … Continue reading

My Ergonomic Workstation: Enhancing Focus, Comfort, and Efficiency

I spend a significant portion of my professional life at a desk. Because of this, an optimized workstation isn't just a luxury for me, it's an absolute necessity. I've spent time designing a workspace that balances ergonomics, efficiency, and versatility. I'm sharing my setup here because I've always found it valuable to see how other IT specialists configure their spaces, gain a little inspiration, and exchange ideas. I'd love to hear about your own workstation in the comments! Here is a breakdown of the gear I use to support sustained focus, comfort, and productivity. Sit-stand desk converter The anchor of … Continue reading

Lightvim - The Efficient Vim/Neovim Configuration

The Lightvim project is a Vim configuration that is intended to serve as a solid foundation for a Vim configuration. The author began developing this configuration upon first adopting Vim and has continuously refined it over 25 years of research and testing to identify the most effective parameters and optimizations for a Vim configuration file. This Vim configuration does not install any plugins. It lets you choose exactly which plugins to use, giving you the freedom to build a setup suited to your specific needs without unnecessary dependencies or bloat. Installation Clone the repository into ~/.lightvim: git clone https://github.com/jamescherti/lightvim ~/.lightvim … Continue reading

Enhancing Git Diff for Emacs Lisp: Better Git Diff of Elisp function or macro definitions

By default, the git diff algorithm compares changes in Elisp files line by line without understanding the structural semantics of Emacs Lisp files. This means that when modifications are made within functions, the diff output does not convey how those changes relate to higher-level code constructs such as functions or macros. As a result, reviewers are presented with fragmented and often verbose diffs where the context of a change, such as which function it belongs to, is not always readily apparent. This lack of structural awareness can make it difficult to assess the purpose and impact of changes efficiently. Git … Continue reading

Python: How to clear stdin before using the input() function

In Python, the input() function is commonly used to capture input from the user. However, issues may arise when unwanted or unexpected data is present in the stdin, leading to incorrect or incomplete results when calling input(). A reliable approach to address this issue is to clear the stdin buffer before invoking input(). This article discusses why discarding the stdin buffer is necessary and how to implement it correctly to ensure accurate and clean input handling on both POSIX systems (such as Unix, Linux, and macOS) and Windows. Why does stdin need to be cleared? When working with user input, … Continue reading

Bash shell: Interactive Menu to Insert any String from the Tmux Scrollback Buffer Into the Shell Prompt

Imagine you're working in a tmux session, navigating logs, editing config files, or running commands, and you suddenly need to reuse a path, a variable name, or a keyword that appeared earlier on the tmux scrollback buffer. Instead of scrolling back or retyping it manually, you press Ctrl-n, type a few fuzzy letters, press enter, and the desired string from the tmux scrollback is instantly inserted at your cursor. The tmux scrollback buffer is the internal history of terminal output that tmux maintains for each pane. It consists of the lines that have scrolled off the visible screen but are … Continue reading