I hereby claim:
- I am techplexengineer on github.
- I am techplex (https://keybase.io/techplex) on keybase.
- I have a public key ASCZD0EJzrxNgUHnfD0q0_Dz1zHITZzOuWy2Xg0Y4Bn4rQo
To claim this, I am signing this object:
| #include <stdio.h> | |
| #include <linux/joystick.h> | |
| #include <sys/ioctl.h> | |
| #include <fcntl.h> | |
| #include <linux/input.h> | |
| #define KEY_MAX_LARGE 0x2FF | |
| #define KEY_MAX_SMALL 0x1FF | |
| #define JSIOCSBTNMAP_LARGE _IOW('j', 0x33, __u16[KEY_MAX_LARGE - BTN_MISC + 1]) |
| import { spawn } from 'child_process'; | |
| const process = spawn('mpg321', ["-q", "/home/pi/r2_control/sounds/HUM__014.mp3", '-g', "50"]); | |
| let stdOut = []; | |
| let stdErr = []; | |
| process.stdout.on('data', (data) => { | |
| stdOut.push(data); | |
| }); |
| (()=>{ | |
| function convertToCSV(arr) { | |
| const array = [Object.keys(arr[0])].concat(arr) | |
| return array.map(it => { | |
| return Object.values(it).toString() | |
| }).join('\n') | |
| } | |
| if (typeof ContactRosterModel == "undefined") { |
| (() => { | |
| // ----------------------------------------------------------------- | |
| // CONFIG (you're safe to edit this) | |
| // ----------------------------------------------------------------- | |
| // ~ GLOBAL CONFIG | |
| // ----------------------------------------------------------------- | |
| const MODE = 'sort_playlist'; // 'publish_drafts' / 'sort_playlist'; | |
| const DEBUG_MODE = true; // true / false, enable for more context | |
| // ----------------------------------------------------------------- | |
| // ~ PUBLISH CONFIG |
| // ---- First extract the table headers | |
| hdrs = [] | |
| $("#PriorityTable tr.cart-header-row").each((idx, row) => { | |
| $("th", row).each((idx2, col)=>{ | |
| hdrs.push($(col).text()) | |
| }) | |
| }) | |
| hdrs.push("Part Number") | |
| // console.log("Headers:",hdrs) |
| const ruleData = []; | |
| $('p[class$="Rule"],p[class$="Rules"]').each((idx, rule) => { | |
| const ruleObj = {}; | |
| const ruleText = $(rule).find('span:first').text().match(/([A-Za-z])([0-9]+)/i); | |
| if (_.isNull(ruleText)) { return true; } | |
| ruleObj.section = ruleText[1]; | |
| ruleObj.number = ruleText[2]; |
I hereby claim:
To claim this, I am signing this object:
| // -------------------------------------- | |
| // i2c_scanner | |
| // | |
| // Version 1 | |
| // This program (or code that looks like it) | |
| // can be found in many places. | |
| // For example on the Arduino.cc forum. | |
| // The original author is not know. | |
| // Version 2, Juni 2012, Using Arduino 1.0.1 | |
| // Adapted to be as simple as possible by Arduino.cc user Krodal |
| // Simple Arithmetics Grammar | |
| // ========================== | |
| // | |
| // Accepts expressions like "2 * (3 + 4)" and computes their value. | |
| Expression | |
| = head:Term tail:(_ ("+" / "-") _ Term)* { | |
| return tail.reduce(function(result, element) { | |
| if (element[1] === "+") { return result + element[3]; } | |
| if (element[1] === "-") { return result - element[3]; } |
| def main(): | |
| client = TwitchClient(client_id='a57grsx9fi8ripztxn8zbxhnvek4cp') | |
| # Monkey patch TwitchClient.users to add get_by_name https://github.com/tsifrer/python-twitch-client/pull/52 | |
| from types import MethodType | |
| from twitch.resources import User | |
| def get_by_name(self, user_ids): | |
| if isinstance(user_ids, str): | |
| user_ids = [user_ids] |