Skip to content

Instantly share code, notes, and snippets.

@snalvc
snalvc / .0dev-env
Last active December 24, 2025 01:33
Remote Access Cheat Sheet
Development Environment Configurations
@snalvc
snalvc / .zshrc
Last active November 25, 2025 08:55
Update JSON field
update_json_field() {
command jq --arg val "$1" "$2=\$val" "$3" > "$3.tmp" && command mv "$3.tmp" "$3"
}
@snalvc
snalvc / verify-touchpad.sh
Created November 14, 2025 07:33
Verify libinput SRU for touchpads
#!/bin/bash
# set -e: Exit immediately if a command exits with a non-zero status.
# set -x: Print commands and their arguments as they are executed.
set -ex
# --- Check for root access ---
if [ "$(id -u)" -ne 0 ]; then
echo "This script must be run as root (or with sudo)."
exit 1
@snalvc
snalvc / ft2232_to_digilent_jtag.md
Created May 9, 2022 09:51 — forked from rikka0w0/ft2232_to_digilent_jtag.md
FT2232 to Digilent JTag for Xilinx FPGAs (ISE/Vivado)

The Digilent JTag uses FT2232, but its configuration EEPROM contains secrete data needed to be recoginzed by Xilinx ISE/Vivado. The following method only works on linux (tested on Ubuntu16.04), but the patched FT2232 doggle also works on Windows. Since WSL1 does not provide USB device access, the following method will not work for WSL1.

DONT use FT_Prog on offical Digilent cable, as it can trash the firmware! The offical eeprom contains secrete data that cannot be handled correctly by FT_Prog.

Here are steps to create a Digilent-like Jtag that can be used in Xilinx ISE and Vivado

  1. Install softwares: sudo apt-get install libftdi1 ftdi-eeprom
  2. Create a file "flash_digilent.conf" with the following content: