Example of setting up Grafana to read from Firefly. See https://www.reddit.com/r/FireflyIII/comments/nogrl5 for context.
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: | |
domain: automation | |
name: Danfoss Ally Room Load Balancing | |
description: > | |
Calculate and send room mean load every 15min to | |
load balance TRVs in the same room, via zigbee2mqtt. | |
Uses Danfoss recommended calculation. | |
input: | |
ally_devices: | |
name: Danfoss Ally TRV Device |
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: | |
domain: automation | |
name: Danfoss Ally Ext Temp Z2M | |
description: Update Danfoss Ally TRV external temperature with min/max refresh rate, via zigbee2mqtt | |
input: | |
ally_device: | |
name: Ally TRV Device | |
description: Temperature reading will be sent to this device | |
selector: | |
device: |
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
snowman on 84 [!?] is 📦 v0.1.0 via 🐍 v3.8.3 (.venv) | |
❯ poetry add gdal | |
Using version ^3.1.2 for gdal | |
Updating dependencies | |
Resolving dependencies... | |
Writing lock file |
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
"http://download.kiwix.org/zim/wikipedia_ab_all.zim.torrent" | |
"http://download.kiwix.org/zim/wikipedia_ab_all_nopic.zim.torrent" | |
"http://download.kiwix.org/zim/wikipedia_ace_all.zim.torrent" | |
"http://download.kiwix.org/zim/wikipedia_ace_all_nopic.zim.torrent" | |
"http://download.kiwix.org/zim/wikipedia_ady_all.zim.torrent" | |
"http://download.kiwix.org/zim/wikipedia_ady_all_nopic.zim.torrent" | |
"http://download.kiwix.org/zim/wikipedia_af_all.zim.torrent" | |
"http://download.kiwix.org/zim/wikipedia_af_all_nopic.zim.torrent" | |
"http://download.kiwix.org/zim/wikipedia_ak_all.zim.torrent" | |
"http://download.kiwix.org/zim/wikipedia_ak_all_nopic.zim.torrent" |
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
// http://stackoverflow.com/questions/9160001/how-to-profile-methods-in-scala | |
def time[R](block: => R): R = { | |
val t0 = System.nanoTime() | |
val result = block // call-by-name | |
val t1 = System.nanoTime() | |
println("Elapsed time: " + (t1 - t0) + "ns") | |
result | |
} |
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
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
// Run this in the F12 javascript console in chrome | |
// if a redirect happens, the page will pause | |
// this helps because chrome's network tab's | |
// "preserve log" seems to technically preserve the log | |
// but you can't actually LOOK at it... | |
// also the "replay xhr" feature does not work after reload | |
// even if you "preserve log". | |
window.addEventListener("beforeunload", function() { debugger; }, false) |
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
#!/bin/bash | |
listenport_on_remote=5500 | |
identity_key=/home/me/.ssh/tunnel | |
############################# | |
REMOTE=$1 | |
if [ ! "$REMOTE" ]; then |
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
// Usage: | |
// val dircache = new CachedMkdir | |
// dircache.mkdirp("a/b/c/d/e") // creates the directory structure | |
// dircache.mkdirp("a/b/c/d/e") // does nothing | |
// dircache.mkdirp("a/b/Z/Y/Z") // only creates from b/ down | |
class CachedMkdir { | |
var cache = Set[String]() |
NewerOlder