Skip to content

Instantly share code, notes, and snippets.

@ToadKing
ToadKing / resetera-inline-refresh.md
Last active July 9, 2018 17:33
ResetEra Inline Refresh
@ToadKing
ToadKing / pro.c
Created June 23, 2017 03:42
pro controller descriptors
// USB Device Descriptor
0x12, // bLength
0x01, // bDescriptorType (Device)
0x00, 0x02, // bcdUSB 2.00
0x00, // bDeviceClass (Use class information in the Interface Descriptors)
0x00, // bDeviceSubClass
0x00, // bDeviceProtocol
0x40, // bMaxPacketSize0 64
0x7E, 0x05, // idVendor 0x057E
@ToadKing
ToadKing / pro.py
Last active June 23, 2017 04:27
pro controller stuffs
#!/usr/bin/env python
# Original Author: Michael Lelli <toadking@toadking.com>
import usb.core
import usb.util
import os
dev = usb.core.find(idVendor=0x057e, idProduct=0x2009)
// ==UserScript==
// @name find hidden seeds
// @namespace smash.gg.seeeeeeeeeeeeeeeeeds
// @include http://smash.gg/*
// @include https://smash.gg/*
// @version 1
// @grant none
// ==/UserScript==
var scripts = document.getElementsByTagName("script");
@ToadKing
ToadKing / gist:20710a49945715fae3e7
Created September 1, 2015 01:44
Remove Promoted Stream Items
// ==UserScript==
// @name Remove Promoted Stream Items
// @namespace http://userscripts.org/
// @version 0.1
// @description Hides promoted items from Twitter streams. Was only able to test with the stream from a sponsered hash tag, because promoted items in timelines are elusive. More specifically, sets style "display: none" on the parent of divs with classes promoted-tweet and stream-item-content.
// @include http://twitter.com/*
// @include https://twitter.com/*
// @author Dan Carleton
// @copyright 2011+, Public Domain
// ==/UserScript==
input_max_users = "16"
input_axis_threshold = "0.500000"
ui_companion_start_on_boot = "true"
video_gpu_record = "false"
input_remap_binds_enable = "true"
netplay_client_swap_input = "true"
input_descriptor_label_show = "true"
autoconfig_descriptor_label_show = "true"
input_descriptor_hide_unbound = "false"
load_dummy_on_core_shutdown = "true"
@ToadKing
ToadKing / gist:a5edb237cb3e4433c3f3
Created December 18, 2014 05:52
Wii U adapter emulator
// Super messy and adapted almost exclusively from libusb-gadget loopback example
/*
* Copyright (C) 2009 Daiki Ueno <ueno@unixuser.org>
* This file is part of libusb-gadget.
*
* libusb-gadget is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
@ToadKing
ToadKing / gist:3b452a4121fede44a50f
Last active June 3, 2022 06:34
Wii U GC adapter - Working prototype
diff --git a/glide2gl/src/Glitch64/geometry.c b/glide2gl/src/Glitch64/geometry.c
index 73eea75..754e7af 100644
--- a/glide2gl/src/Glitch64/geometry.c
+++ b/glide2gl/src/Glitch64/geometry.c
@@ -28,7 +28,7 @@
#include "main.h"
#include "../Glide64/rdp.h"
-struct draw_buffer {
+/*struct draw_buffer {
Error: WebGL: enable: invalid enum value 0xde1 retroarch.js:1
Error: WebGL: texImage2D: no texture is bound to target TEXTURE_2D retroarch.js:1
Error: WebGL: texParameter: no texture is bound to this target retroarch.js:1
Error: WebGL: enable: invalid enum value 0xde1 retroarch.js:1
Error: WebGL: linkProgram: a fragment shader used in this program failed to compile, with this log:
ERROR: 0:30: 'gl_FragDepth' : undeclared identifier
retroarch.js:1
Error: WebGL: useProgram: program was not linked successfully retroarch.js:1
Error: WebGL: vertexAttribPointer: must have valid GL_ARRAY_BUFFER binding retroarch.js:1