Skip to content

Instantly share code, notes, and snippets.

View shteou's full-sized avatar
:shipit:

Stewart Platt shteou

:shipit:
View GitHub Profile
@shteou
shteou / fix-broken-cougar-y-axis.py
Created March 23, 2025 00:23
Stew's script to work around his broken y axis
from evdev import ecodes, uinput, AbsInfo, InputDevice
# This script works around a broken y axis for my Thrustmaster Cougar throttle.
# The y axis reads off center, this works around it by scaling the reported value around an offset
# It's not perfect, but it makes the joystick usable at least.
# The script works by grabbing exclusive access to the real device and proxying its events
# to a new virtual device, applying value fixes to the appropriate events
# The ID of my broken 20 year old Thrustmaster Cougar
input_device = InputDevice('/dev/input/by-id/usb-Thrustmaster_Thrustmaster_HOTAS_Cougar-event-joystick')
@shteou
shteou / wirehair_modification_benchmarks.txt
Created February 13, 2012 23:34
Wirehair modification benchmarks
[stew@ks381068 wirehair]$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /build/src/gcc-4.6-20120120/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --enable-libstdcxx-time --enable-gnu-unique-object --enable-linker-build-id --with-ppl --enable-cloog-backend=isl --enable-lto --enable-gold --enable-ld=default --enable-plugin --with-plugin-ld=ld.gold --disable-multilib --disable-libssp --enable-checking=release
Thread model: posix
gcc version 4.6.2 20120120 (prerelease) (GCC)
-------------------------------------------------