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
Based on: | |
https://gist.github.com/gjrdiesel/4e93d8743b71babb58dcba4ee049247c | |
https://www.reddit.com/r/Proxmox/comments/hkvl9a/cant_extend_ubuntu_20_lvm_after_expanding_raw_disk/ | |
1. | |
`lsblk` |
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 buffer = require('buffer'); | |
const crypto = require('crypto'); | |
// Demo implementation of using `aes-256-gcm` with node.js's `crypto` lib. | |
const aes256gcm = (key) => { | |
const ALGO = 'aes-256-gcm'; | |
// encrypt returns base64-encoded ciphertext | |
const encrypt = (str) => { | |
// Hint: the `iv` should be unique (but not necessarily random). |
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
#define TRIAC_PIN 5 | |
#define ZERO_CROSS_PIN 4 | |
#define DEBOUNCE_TIME 9000 //9ms - 10ms is the pulse period | |
static uint32_t lastPulse = 0; | |
static uint16_t period = 5000; //5ms - 50% for each half wave | |
void ICACHE_RAM_ATTR onTimerISR(){ | |
if(GPIP(TRIAC_PIN)){//OUTPUT is HIGH | |
GPOC = (1 << TRIAC_PIN);//low |