This variation of a donut chart demonstrates how to add labels with lines and also works with missing/new data. Clicking on the button changes the displayed data.
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
blueprint: | |
name: ZHA - Smart Knob for lights | |
source_url: https://gist.github.com/dbuezas/832d15a762488f2754c59bc9ca9632da | |
description: "Control lights with a Moes Smart Knob. | |
Rotating left/right will change the brightness smoothly of the selected light | |
and making use of step_size. | |
Press-Rotating left/right will change the color temperature (or hue). | |
Long press switches between color temperature and rgb modes. |
This variation of a donut chart demonstrates how to add labels with lines. Clicking on the button changes the displayed data. Check Pie Chart with Labels and Missing Data to see how to handle transitions with missing/new data.
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
# Get a list of all controllers | |
controllers=$(bluetoothctl list | awk '{print $2}') | |
# Loop through each controller and restart it | |
for controller in $controllers; do | |
echo "Turning off: $controller" | |
# Turn off the controller | |
echo -e "select $controller\npower off" | bluetoothctl | |
done |
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
/* | |
Modified SoftWire.cpp file that: | |
- Uses native stm32 calls to manage GPIO | |
- Removes all delays between gpio calls | |
- Clock working at ~260kHz on an STM32H723VG (SKR 3) | |
Make sure to set the right SCL and SDA port and pin below | |
*/ | |
// If possible disable interrupts whilst switching pin direction. Sadly | |
// there is no generic Arduino function to read the current interrupt |
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
load = async (url) => { | |
var head= document.getElementsByTagName('head')[0]; | |
var script= document.createElement('script'); | |
script.type= 'text/javascript'; | |
script.src= url; | |
return new Promise(resolve => { | |
script.addEventListener('load', resolve); | |
head.appendChild(script); | |
}); |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<script src="//d3js.org/d3.v4.min.js"></script> | |
<script src="https://unpkg.com/@hpcc-js/wasm@0.3.11/dist/index.min.js"></script> | |
<script src="https://unpkg.com/d3-graphviz@3.0.5/build/d3-graphviz.js"></script> | |
<button onclick="run()">RUN</button> | |
<div> | |
<div style="width: 25%; float: left;"> | |
<div id="comment1"></div> |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<body> | |
<script src="//d3js.org/d3.v4.min.js"></script> | |
<script src="https://unpkg.com/@hpcc-js/wasm@0.3.11/dist/index.min.js"></script> | |
<script src="https://unpkg.com/d3-graphviz@3.0.5/build/d3-graphviz.js"></script> | |
<button onclick="run()">RUN</button> | |
<div width="100%"> | |
<div width="100%" style="width: 30%; float: left;"> | |
<div id="comment1"> </div> |
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
// Just require this file | |
// david@shop.co | |
// npm install colors | |
var ms, oldLog, path, | |
slice = [].slice; | |
require('colors'); | |
path = require('path'); |
NewerOlder