Skip to content

Instantly share code, notes, and snippets.

@raincode00
raincode00 / xbox_one_s_bt.patch
Last active January 29, 2018 22:17
Xbox One S Controller Bluetooth Fixes on Ubuntu
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index ea36b55..bac17d9 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1984,6 +1984,8 @@ static const struct hid_device_id hid_have_special_driver[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_USB) },
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_DIGITAL_MEDIA_3K) },
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_ONE_S) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_XBOX_ONE_S_2016) },
@raincode00
raincode00 / Launcher.py
Last active March 24, 2018 11:15
Launches an application and forces it to the foreground
import win32gui
import win32process
import win32api
import win32con
import time
from fnmatch import fnmatch
ORIGINAL_PROCESS_EXE = "NeptuniaVII_real.exe"
#define _CRT_SECURE_NO_WARNINGS
#include <Windows.h>
#include "steam/steam_api.h"
#include <string>
#include <iostream>
#include <iomanip>
#include <sstream>
static char authTicketCallbackCalled = false;
static char authTicketCallbackError = false;
@raincode00
raincode00 / embed_manifest.py
Created December 4, 2014 15:57
Embeds manifest file in PyInstaller's windows bootloaders.
"""
Embeds manifest file in PyInstaller's windows bootloaders.
"""
import os
import subprocess
from distutils import msvccompiler
from tempfile import NamedTemporaryFile
def embed_manifest(manifest, target_exe):
msvc = msvccompiler.MSVCCompiler()