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
| #!/bin/bash | |
| ############################################# | |
| # Raspberry Pi SD Card Image Backup Script | |
| # Creates a bootable .img file that can be burned to a new SD card | |
| ############################################# | |
| # Configuration | |
| BACKUP_DIR="/media/<eg-user_name>/<eg-thumb-drive-name>" # Change to your external drive mount point | |
| BACKUP_NAME="rpi_sdcard" |
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
| function streamLiveCpuUsage(){ | |
| if ("WebSocket" in window) { | |
| // Let us open a web socket | |
| var url = "localhost:8081"; | |
| var ws = new WebSocket("ws://"+url+"/stream"); | |
| ws.onmessage = function(event) { | |
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
| package main | |
| import ( | |
| "net/url" | |
| "github.com/labstack/echo" | |
| "github.com/labstack/echo/middleware" | |
| ) | |
| func main() { |
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
| package controllers | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| echo "github.com/labstack/echo/v4" | |
| "golang.org/x/net/websocket" | |
| "stream/models" | |
| ) |