Skip to content

Instantly share code, notes, and snippets.

View pratishbodhale's full-sized avatar

Pratish Bodhale pratishbodhale

View GitHub Profile
@pratishbodhale
pratishbodhale / gist:45d5ae767a9c8d7643ee832726fa44bb
Created October 30, 2025 07:19
Raspberry Pi SD Card Image Backup Script
#!/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"
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) {
package main
import (
"net/url"
"github.com/labstack/echo"
"github.com/labstack/echo/middleware"
)
func main() {
package controllers
import (
"encoding/json"
"fmt"
echo "github.com/labstack/echo/v4"
"golang.org/x/net/websocket"
"stream/models"
)