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
; Description: Scroll Explorer on middle mouse button drag | |
; Permalink: https://autohotkey.com/boards/viewtopic.php?t=43715 | |
; Author: aph | |
; Version: 0.4.1 | |
; Modified by: LeoDJ | |
; changelog: | |
; 0.4.1: - fixed Firefox getting stuck | |
; 0.4.0: - implemented much better exponential scrolling behaviour | |
; - tried to handle sticky scrolling better, but sometimes AHK does not see the KeyUp event, even when polled | |
; 0.3.0: - implement other scrolling behaviour, but still not perfect |
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
const artnet = require('./modules/artnet.module'); | |
const mqtt = require('mqtt'); | |
const port = 0x1936; | |
const listenUniverse = 42; | |
//MQTT stuff | |
var client = mqtt.connect('mqtt://localhost'); |
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
/* put file in <AppData>/Mozilla/Firefox/Profiles/<yourProfile>/chrome */ | |
/* to correctly display tab title as window title, set browser.tabs.drawInTitlebar to false in about:config */ | |
/* note: since FF 69 you also need to set toolkit.legacyUserProfileCustomizations.stylesheets to true for it to work*/ | |
#main-window[tabsintitlebar="true"]:not([extradragspace="true"]) #TabsToolbar { | |
opacity: 0; | |
pointer-events: none; | |
} | |
#main-window:not([tabsintitlebar="true"]) #TabsToolbar { | |
visibility: collapse !important; |
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
long readVcc() { | |
// Read 1.1V reference against AVcc | |
// set the reference to Vcc and the measurement to the internal 1.1V reference | |
#if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) | |
ADMUX = _BV(REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); | |
#elif defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) | |
ADMUX = _BV(MUX5) | _BV(MUX0); | |
#elif defined (__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) | |
ADMUX = _BV(MUX3) | _BV(MUX2); | |
#else |
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
var request = require('request'); | |
let blocked = [], open = [] | |
lastPort = 6000 | |
function pingPort(port) { | |
request('http://portquiz.net:' + port, function (err, res, body) { | |
//console.log(err, res, body) | |
if ((!err && res.statusCode == 200) || (err && err.code == 'HPE_INVALID_CONSTANT')) { |
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
esphome: | |
name: led_strip | |
platform: ESP8266 | |
board: esp01_1m | |
wifi: | |
ssid: "" | |
password: "" | |
# Enable fallback hotspot (captive portal) in case wifi connection fails |
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
esphome: | |
name: cm1106_sensor | |
platform: ESP32 | |
board: wemos_d1_mini32 | |
includes: | |
- "cm1106.h" | |
wifi: | |
ssid: !secret wifi_ssid | |
password: !secret wifi_pass |
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
#!/usr/bin/env python3 | |
# Convert XPV/XDV files to binary (CSR Blueflash / Bluecore firmware files) | |
# Quickly hacked together by LeoDJ | |
import sys | |
import os | |
def xpv2bin(input_file, output_file): | |
with open(input_file) as f_in, open(output_file, "wb") as f_out: |
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
// convert raw data to integer | |
function getVar(inputBytes, offset, varLen, isSigned = false) { | |
let outVal = 0; | |
for (let i = 0; i < varLen; i++) { | |
outVal |= inputBytes[offset + i] << i * 8; | |
} | |
if (isSigned) { // parse as signed value | |
if (inputBytes[offset + varLen - 1] & 0x80) { // sign bit is set | |
outVal = ~(outVal) + 1; // calculate two's complement |