- Python 3
- OpenCV library (cv2)
- NumPy library (numpy)
Install python virtual env sudo apt install python3-venv
export function getNodeVersion(): { major: number; minor: number; patch: number } { | |
const version = process.version.match(/(\d+)\.(\d+)\.(\d+)/); | |
const [major, minor, patch] = ensureArray(version) | |
.slice(1) | |
.map((match) => parseInt(match as string, 10)); | |
return { | |
major, | |
minor, | |
patch, | |
}; |
// Ardiono Date https://adafruit.github.io/RTClib/html/class_date_time.html#a50502a3a29409c6c2507638779df1a9d | |
let now = new Date(); | |
// correct time zone offset for generating iso string | |
now.setMinutes(now.getMinutes() - now.getTimezoneOffset()) | |
console.log(now.toISOString()); |
#!/bin/bash | |
# Get the size of /snapshots | |
SNAPSHOT_SIZE=$(du -hs /snapshots 2>/dev/null | awk '{print $1}') | |
SNAPSHOT_TOTAL=$(ls | grep *.jpg | wc -l 2>/dev/null) | |
echo "[snapshots]" | |
echo "size: $SNAPSHOT_SIZE" | |
echo "total: $SNAPSHOT_TOTAL" | |
# Get the available space on the root partition |