Skip to content

Instantly share code, notes, and snippets.

View mdkcore0's full-sized avatar
💭
why the hell set a status here?

Rodrigo Oliveira mdkcore0

💭
why the hell set a status here?
View GitHub Profile
@mdkcore0
mdkcore0 / device3.py
Created December 13, 2019 18:50
python hid/pyusb test (linux/macos; multiple devices)
# hid==1.0.4
# pyusb==1.0.2
# NOTE: should install hidpai (brew/package manager)
import hid
import binascii
from threading import Thread
# MAYBE, we can register a callback to be notified about device
# add/remove (https://github.com/pyusb/pyusb/pull/160)
from usb import core
@mdkcore0
mdkcore0 / device2.py
Created December 12, 2019 21:12
python hid/pyusb test (linux/macos)
# hid==1.0.4
# pyusb==1.0.2
# NOTE: should install hidpai (brew/package manager)
import hid
import binascii
# MAYBE, we can register a callback to be notified about device
# add/remove (https://github.com/pyusb/pyusb/pull/160)
from usb import core
from usb import util
@mdkcore0
mdkcore0 / device.py
Last active December 6, 2019 19:11
python hid test (linux/macos), should replace pyudev
# hid==1.0.4
# pyusb==1.0.2
# NOTE: should install hodpai (brew/package manager)
import hid
import binascii
def dec_to_hex(value):
return "{0:x}".format(value)
@mdkcore0
mdkcore0 / 0001-Compiling-on-OSX.patch
Last active February 2, 2016 19:24
st on OSX X (with XQuartz)
From c8ddc4f1e53a037fea13b877b6f20641f841fdd7 Mon Sep 17 00:00:00 2001
From: Rodrigo Oliveira <rodrigo.oliveira@byne.com.br>
Date: Fri, 9 Oct 2015 13:49:09 -0300
Subject: [PATCH 1/2] Compiling on OSX
Signed-off-by: Rodrigo Oliveira <rodrigo.oliveira@byne.com.br>
---
config.mk | 10 +++++-----
st.c | 22 +++++++++++++++++++++-
2 files changed, 26 insertions(+), 6 deletions(-)
@mdkcore0
mdkcore0 / mutefy
Last active August 29, 2015 14:02
mutefy
#!/bin/bash
####################################################################
# This script was created by: MDK - mdk@thecoreme.org #
# http://projects.thecoreme.org/ #
# May 28 2014 #
# Last update on Jun 09 2014 #
# #
# Simple script/wrapper to "mute" Spotify's ads #
# based on https://gist.github.com/pcworld/3198763#comment-1233334 #
# #