This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// STOP FUCKING WITH MY REDDIT PAGES FROM SEARCH RESULTS! | |
// (remove referer from reddit links on google) | |
// for use with custom JS injection feature of StopTheMadness MobileSafari extension | |
'use strict'; | |
const DEBUG = (str) => { console.debug(str); }; | |
// generate a string of the path to the given element | |
// from the document root, in CSS selector form |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HOW TO BUILD: | |
// g++ -std=c++17 -fPIC -shared -Wl,--no-undefined -fuse-ld=gold -ldl -lbsd -lusb-1.0 -Wall -O0 -g3 -o libusb_wrapper.so libusb_wrapper.cpp | |
// HOW TO USE: | |
// LD_PRELOAD=libusb_wrapper.so <program command line> | |
#ifndef _GNU_SOURCE | |
#define _GNU_SOURCE | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// reverse engineered based on Windows 10 version 21H1 | |
// used in defragsvc.dll, dfrgui.exe, and probably other places | |
// (the specific enum member names seen here were invented by me) | |
enum DF_DEVICE_TYPE | |
{ // CORRESPONDING "MEDIA TYPE" STRING [with string table index from DfrgUI.exe.mui] | |
TYPE_UNKNOWN = 0x0, // 1188 "Unknown" | |
TYPE_HARD_DISK_DRIVE = 0x1, // 1179 "Hard disk drive" | |
TYPE_REMOVABLE_DRIVE = 0x2, // 1180 "Removable drive" | |
TYPE_SOLID_STATE_DRIVE = 0x3, // 1181 "Solid state drive" |