Skip to content

Instantly share code, notes, and snippets.

View leanfj's full-sized avatar
🎯
Focusing

Leandro de Jesus leanfj

🎯
Focusing
View GitHub Profile
Math.random().toString(36).slice(2)
@leanfj
leanfj / xbox360fix.py
Created January 11, 2025 13:34
Fix xbox 360 controller python
#!/usr/bin/env python3
import usb.core
dev = usb.core.find(idVendor=0x045e, idProduct=0x028e)
if dev is None:
raise ValueError('Device not found')
else:
dev.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14)