This file contains hidden or 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
import enum | |
import struct | |
from pymodbus.client.sync import ModbusSerialClient | |
from pymodbus.payload import BinaryPayloadBuilder, BinaryPayloadDecoder | |
class Coil(enum.IntEnum): | |
ISTATE = 0x0510 | |
class Reg(enum.IntEnum): |
This file contains hidden or 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
void draw_element(int recurse, int max_recurse) { | |
if (recurse == max_recurse) { | |
line(0,0,1,0); | |
} else { | |
pushMatrix(); | |
scale(1/3.0); | |
draw_element(recurse+1, max_recurse); | |
translate(1, 0); | |
rotate(PI/3.0); |
This file contains hidden or 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
#include "dwt_timer.h" | |
#define BITLEN_HIGH_0 0 | |
#define BITLEN_HIGH_1 50 | |
#define BITLEN_LOW_0 50 | |
#define BITLEN_LOW_1 40 | |
struct sk6812_base { |
This file contains hidden or 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
// ==UserScript== | |
// @name USDA Nutrition database scroll fix | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Removes artificial scroll on the USDA Nutrition database food results | |
// @author Simon Schubert <2-gist@0x2c.org> | |
// @match https://ndb.nal.usda.gov/ndb/foods/show/* | |
// @grant none | |
// ==/UserScript== |
This file contains hidden or 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
#include <Wire.h> | |
#include <scpi.h> | |
#include <Servo.h> | |
#define SCPI_INPUT_BUFFER_LENGTH 256 | |
#define SCPI_ERROR_QUEUE_SIZE 17 | |
#define SCPI_IDN1 "BITS AND ELECTRONS" | |
#define SCPI_IDN2 "SERVO OUTPUT" | |
#define SCPI_IDN3 NULL | |
#define SCPI_IDN4 "0.1" |
This file contains hidden or 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
#include <Wire.h> | |
#include <scpi.h> | |
#define SCPI_INPUT_BUFFER_LENGTH 256 | |
#define SCPI_ERROR_QUEUE_SIZE 17 | |
#define SCPI_IDN1 "BITS AND ELECTRONS" | |
#define SCPI_IDN2 "SCPI TEMPLATE" | |
#define SCPI_IDN3 NULL | |
#define SCPI_IDN4 "0.1" |
This file contains hidden or 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
// ==UserScript== | |
// @name MyFitnessPal Percentages and Net Carbs | |
// @version 1.14 | |
// @namespace surye | |
// @description Adds display of Carb/Protein/Fat percentages to any daily food diary page. Also adds "Real Calories" calcalation based off 4/4/9 algorithm. Based on "MyFitnessPal Percentages and Net Carbs" | |
// @downloadURL https://github.com/Surye/mfp-keto-userscript/raw/master/mfpketo.user.js | |
// @include http*://www.myfitnesspal.com/food/diary* | |
// ==/UserScript== | |
This file contains hidden or 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
Info : Padding image section 0 with 21940 bytes | |
Error: flash write algorithm aborted by target | |
Error: flash write failed at address 0x8002c02 | |
Error: flash memory not erased before writing | |
Error: error writing to flash at address 0x08000000 at offset 0x00002000 |
This file contains hidden or 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
// ==UserScript== | |
// @name Aliexpress URL Cleaner | |
// @run-at document-start | |
// @namespace | |
// @description Clean aliexpress item URL | |
// @match *://*.aliexpress.com/item/* | |
// @match *://*.aliexpress.com/store/product/* | |
// @version 1.2 | |
// ==/UserScript== |
This file contains hidden or 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
modified pcbnew/class_netclass.cpp | |
@@ -102,7 +102,7 @@ bool NETCLASSES::Add( NETCLASSPTR aNetClass ) | |
if( name == NETCLASS::Default ) | |
{ | |
// invoke operator=(), which is currently generated by compiler. | |
- GetDefault() = aNetClass; | |
+ m_default = aNetClass; | |
return true; | |
} |