Skip to content

Instantly share code, notes, and snippets.

@jayme-github
jayme-github / disable_raydium_touchscreen_thinkpad_x1_carbon_7th.md
Created March 28, 2020 11:37
Disable Raydium Touch System touchscreen on ThinkPad X1 Carbon 7th gen

To make the usbhid driver ignore the touchscreen device, add a HID_QUIRK_IGNORE quirk as module paramater:

Add a modprobe file, like /etc/modprobe.d/disable_raydium_touchscreen.conf:

# Add/modify USB HID quirks by specifying
# quirks=vendorID:productID:quirks where vendorID, productID, and quirks are all in 0x-prefixed hex
#
# For a list of quirks, see https://github.com/torvalds/linux/blob/master/include/linux/hid.h
options usbhid quirks=0x2386:0x4328:0x00000004
@tobetchi
tobetchi / main.cpp
Created September 28, 2016 08:20
openFrameworks OSC send sample
#include "ofMain.h"
#include "ofApp.h"
int main( ){
ofSetupOpenGL(1024, 768, OF_WINDOW);
ofRunApp(new ofApp());
}
@ryancdotorg
ryancdotorg / frag32.py
Created August 20, 2015 16:27
A FAT32 fragmenter, because I am a horrible person.
#!/usr/bin/env python
import random
import struct
import sys
# Most of the Fat32 class was cribbed from https://gist.github.com/jonte/4577833
def ppNum(num):
return "%s (%s)" % (hex(num), num)
@alotaiba
alotaiba / google_speech2text.md
Created February 3, 2012 13:20
Google Speech To Text API

Google Speech To Text API

Base URL: https://www.google.com/speech-api/v1/recognize
It accepts POST requests with voice file encoded in FLAC format, and query parameters for control.

Query Parameters

client
The client's name you're connecting from. For spoofing purposes, let's use chromium

lang
Speech language, for example, ar-QA for Qatari Arabic, or en-US for U.S. English

//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Created: 2010/12/05
// Updated: 2018/09/12
// License: MIT
//
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it)
//