Skip to content

Instantly share code, notes, and snippets.

@jasonwhite
jasonwhite / joystick.c
Last active May 3, 2024 13:28
Reads joystick/gamepad events on Linux and displays them.
/**
* Author: Jason White
*
* Description:
* Reads joystick/gamepad events and displays them.
*
* Compile:
* gcc joystick.c -o joystick
*
* Run:
@jmpinit
jmpinit / libload.sh
Last active June 6, 2020 15:28
How to use a shared library written in C from a program written in Rust. ( rust version 0.7. \ host: i686-unknown-linux-gnu ).
# so the lib can be found when the test is run
export LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH
# alternatively put the .so generated after running make someplace where the system will find it