Skip to content

Instantly share code, notes, and snippets.

@leonkasovan
leonkasovan / is_keyboard.c
Last active December 27, 2024 11:09
Check device path is a valid keyboard
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/input.h>
#include <string.h>
// Function to check if the input device is a keyboard
int is_keyboard(const char *device_path) {
-- Lua script for verifying Ikemen's game assets
-- [email protected]
-- 20.10 Selasa, 01 Oktober 2024
path_sep = '/'
local f_validation = io.open("validation"..os.date("%Y%m%d_%H%M%S")..".txt", "w")
if f_validation == nil then
print("Error: Can not create validation.txt")
return
end
@leonkasovan
leonkasovan / rpi5_setup_dev.txt
Last active March 20, 2025 04:35
Setup Dev Environment for Raspberry Pi 5
wget https://go.dev/dl/go1.24.1.linux-arm64.tar.gz
sudo tar -C /usr/local -xzf go1.24.1.linux-arm64.tar.gz
sudo apt install apt-file fd-find scite
sudo apt-file update
# for building Ikemen
sudo apt install libwayland-dev libxkbcommon-dev libasound2-dev libssl-dev
sudo apt install fd-find
font.base=$(font.monospace)
font.small=$(font.monospace)
font.comment=$(font.monospace)
font.text=$(font.monospace)
font.text.comment=$(font.monospace)
font.embedded.base=$(font.monospace)
font.embedded.comment=$(font.monospace)
font.vbs=$(font.monospace)
wrap=0