Skip to content

Instantly share code, notes, and snippets.

View rajayonin's full-sized avatar

Luis Daniel Casais rajayonin

View GitHub Profile
@rajayonin
rajayonin / fix-cachyos.md
Created October 7, 2025 07:13
error: cachyos: signature from "CachyOS <admin@cachyos.org>" is invalid
sudo pacman-key --refresh-keys
sudo pacman -Syyu
@rajayonin
rajayonin / downgrade-aur.md
Created May 28, 2025 09:23
How to downgrade an AUR package

First, go to the directory containing the PKGBUILD file for the package. If you're using YAY (as you should), that path is ~/.cache/yay/<package-name>.

Once there, as there is a Git repository present, just reset the tree to your desired version.
E.g., to go to the previous version:

git reset --hard HEAD^1

Then, build with Makepkg:

makepkg -si
@rajayonin
rajayonin / print-arch.md
Last active April 3, 2025 09:01
How to enable printing in Arch Linux (and derivates)

Install cups and system-config-printer, and enable the CUPS service:

sudo pacman -S cups system-config-printer
sudo systemctl start cups
sudo systemctl enable cups

Tip

You can check if CUPS is running by going to http://localhost:631/

@rajayonin
rajayonin / plantuml-latex.md
Last active December 5, 2025 09:12
How to insert PlantUML into LaTeX
@rajayonin
rajayonin / chrome-gesture-navigation-wayland.md
Last active January 30, 2025 08:10
How to enable history navigation with gestures for Google Chrome on Linux Wayland

First, in Chrome, go to chrome://flags/ and set Preffered Ozone to Wayland.

Then you need to pass the --enable-features=TouchpadOverscrollHistoryNavigation flag to the executable.
On Chrome's .desktop file, set the Exec property to the following:

Exec=/usr/bin/google-chrome-stable --enable-features=TouchpadOverscrollHistoryNavigation %U

Typically, the file is stored in /usr/share/applications/google-chrome.desktop, but this gets overwritten every time the application is updated, so my recomendation is to copy it to ~/.local/share/applications and modify it there.

@rajayonin
rajayonin / setup-xdg-terminal-exec.md
Last active September 30, 2026 10:21
How to setup xdg-terminal-exec in Linux

Setting up xdg-terminal-exec

xdg-terminal-exec is a proposed standard for selecting which terminal application to use when opening files in the desktop.

To configure it, first install it (e.g. xdg-terminal-exec through AUR). Then you must create a symnlink in /usr/share/xdg-terminals/ to your terminal's .desktop file (typically found in /usr/share/applications/).

Example - Ghostty:

sudo ln -s /usr/share/applications/com.mitchellh.ghostty.desktop /usr/share/xdg-terminals
@rajayonin
rajayonin / multiple-git-accounts.md
Created January 10, 2025 08:38
How to use multiple Git accounts (with SSH keys)

Using multiple Git accounts

First you must generate one SSH key per account (save them with different names).

E.g.:

~/.ssh/
├─ id_ed25519
├─ id_ed25519.pub
├─ id_ed25519-work
@rajayonin
rajayonin / marp-multicolum.md
Last active March 17, 2025 08:48
Example of how to use multiple columns in Marp
---
marp: true
style: |
   .columns {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 1rem;
   }
---
@rajayonin
rajayonin / cmake-header-only-lib.md
Last active March 25, 2025 14:50
Download and add a header-only C++ library in CMake

Download and add a header-only C++ library in CMake

The best way to automagically install a third party C++ library is through CMake, downloading the file at setup time.

We do this in 3 steps:

  1. Download the header file from the URL (e.g. GitHub) to the build directory, if it doesn't exist already.
    if (NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/mylib.hpp")
        file (
            DOWNLOAD https://raw.githubusercontent.com/rajayonin/mylib/main/mylib.hpp