A Pen by Michael Salaverry on CodePen.
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
| <script setup> | |
| import { ref } from 'vue' | |
| const hover = ref(false) | |
| const key = ref('') | |
| const events = ref([]) | |
| document.addEventListener('keydown', (e) => { | |
| key.value = e.key; | |
| events.value.push({ key: e.key, hover: hover.value.toString() }) |
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
| classDiagram | |
| direction RL | |
| Tasmota --> MqttBroker: Tasmota publishes sensor readings to broker | |
| class Tasmota{ | |
| publish() | |
| } | |
| class MqttBroker { | |
| message_queue | |
| } | |
| Mqttjs --> Chartjs: onRecieve pushes new data and updates Chart |
Tesseract.js based OCR from Webcam
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
| const axios = require('axios').default; | |
| let callCounter = {}; | |
| const displayCalls = () => { | |
| console.log(callCounter); | |
| }; | |
| function makeInterceptor(keyName, returns) { | |
| callCounter[keyName] = 0; | |
| return (r) => { | |
| callCounter[keyName]++; |
A Pen by Michael Salaverry on CodePen.
A Pen by Michael Salaverry on CodePen.
A Pen by Michael Salaverry on CodePen.
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
| class Candle extends HTMLElement { | |
| constructor() { | |
| super(); | |
| this.attachShadow({ mode: "open" }); | |
| const wrapper = document.createElement("span"); | |
| wrapper.setAttribute("class", "candle"); | |
| const candleFlicker = document.createElement("img"); | |
| candleFlicker.setAttribute( |