Skip to content

Instantly share code, notes, and snippets.

View b-Tomas's full-sized avatar

Tomás Badenes b-Tomas

View GitHub Profile
@b-Tomas
b-Tomas / MCUXpresso-IDE-on-Arch.md
Created May 28, 2026 00:35
Installing MCUXpresso IDE on Arch Linux

Installing MCUXpresso IDE on Arch Linux

The mcuxpresso-ide and linkserver AUR packages cannot be installed with an AUR helper such as yay as the binaries are behind NXP's login wall and the PKGBUILD expects them as local files. You have to build manually with makepkg.

1. Download the binaries

Create an account at nxp.com and download both .deb.bin files (accept the EULA for each):

@b-Tomas
b-Tomas / fix-KD-E10.sh
Created October 28, 2025 02:38
AV Access KD-E10 Linux support (fix monitor disconnect and device restart on 2x1 Dual-Monitor KVM Dock Switcher)
# Based on https://community.avaccess.com/t/kd-e10-34-monitor-with-3440x1440-goes-off-and-on-on-linux-xubuntu-24-04-only/446/3
# This solves the monitor disconnect and device restart that happened every ~25s on Pop!_OS 22.04 LTS
# when the USB Type-B to Type-A cable was connecting the desktop and the dock/switch, with the device 2 (desktop) being active.
# The original author reported the issue on Xubuntu 24.04
# The cause of the issue seems to be `brltty` taking over the UART interface on the KVM Switch/Dock, mistakenly detecting
# the CP210x (USB to UART bridge) controller present on the device as a Braille terminal.
# The following two lines stop the currently running `brltty` service and mask it so that it doesn't get activated again.
@b-Tomas
b-Tomas / pptx_to_pdf.py
Created August 17, 2025 22:09
PPTX to PDF
import os
import subprocess
import sys
"""
This script converts all .pptx files in a specified folder to .pdf format
using LibreOffice.
Functions:
convert_pptx_to_pdf(input_folder):
@b-Tomas
b-Tomas / lines-by-author.sh
Created August 11, 2025 18:55
Count lines by author within a git repo or a subdirectory of it
#!/bin/bash
# Shows the number of lines authored by each author in the current repo or the specified subdirectory
lines-by-author() {
if ! command -v parallel >/dev/null 2>&1; then
echo "GNU parallel is not installed. Please install it to run this script."
exit 1
fi
# Default to the repo root if no path is provided
@b-Tomas
b-Tomas / vivado-on-linux.md
Last active May 15, 2025 23:46
Install Xilinx Vivado on Ubuntu Linux

Install Vivado 2024.2 on Ubuntu 24.04 LTS (and other distros)

Tested on:

  • Pop!_OS 24.10

Dependencies

# Vivado requires libtinfo5. Ubuntu comes with libtinfo6 but they are compatible enough.
# List libtinfo versions
@b-Tomas
b-Tomas / lofree-fn-fix.sh
Created May 3, 2025 16:27
Lofree Flow Lite fn keys Linux permanent fix
# Fixes the fn row key for Lofree keyboards on Linux.
# Non-permanent fix: https://github.com/alexeygumirov/lofree-flow-fn-fix/blob/main/lofreemodefix
echo 'options hid_apple fnmode=2' | sudo tee /etc/modprobe.d/hid_apple.conf
sudo update-initramfs -u
@b-Tomas
b-Tomas / moveit.sh
Last active September 21, 2024 17:19
RSync a whole Linux filesystem (sorta) - Pop-OS!
# Move an installation of Pop-OS! from one disk to another.
# Useful guide if transferring data from a non encrypted install to an encrypted install.
# Create a fresh install of Pop-OS! in the new drive, and operatating from the live env do:
# unlock encrypted partitions
sudo udisksctl unlock -b /dev/<part>
# mount partitions
sudo udisksctl mount -b /dev/mapper/data-root # Or some other alias returned earlier
# REPEAT ABOVE FOR SOURCE AND DESTINATION