Skip to content

Instantly share code, notes, and snippets.

View stefanthoss's full-sized avatar
🏠
Working from home

Stefan Thoss stefanthoss

🏠
Working from home
View GitHub Profile
@stefanthoss
stefanthoss / covid-19-bay-area-data.ipynb
Last active July 19, 2021 04:47
COVID-19 in the Bay Area. This Jupyter notebook loads the New York Times data files with cumulative counts of coronavirus cases in the United States from https://github.com/nytimes/covid-19-data and visualizes them for the San Francisco Bay Area.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@stefanthoss
stefanthoss / freebsd-check-disk-standby-status.sh
Last active April 25, 2020 04:32
This script checks the standby status of disks in a FreeBSD system (e.g. FreeNAS). It can be used to check whether disks are spinning down properly. For each SATA and IDE hard drive, it will return either standby (0x00) or active/idle (0xff). The script needs to be run as root.
#!/usr/bin/env bash
DEVICES=$(camcontrol devlist | awk -F '[,)]' '{print $2}' | awk '/ad/{print}')
for DEV in $DEVICES; do
    printf "%s: " "$DEV"
    camcontrol epc "$DEV" -c status -P
done