Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
for drive in $(sg_scan -i | grep "SanDisk DO" -B 1 | awk '{print $1}' | grep /)
do
smartctl -a ${drive::-1} > /tmp/smart.info
echo "Info for ${drive::-1}"
grep "Product:" /tmp/smart.info
grep "SMART Health Status:" /tmp/smart.info
grep "Serial number:" /tmp/smart.info
grep "Percentage used endurance indicator:" /tmp/smart.info
grep "Logical block size:" /tmp/smart.info
@jamestutton
jamestutton / Dog Boot Dryer ESPHome
Created July 8, 2020 09:20 — forked from jptrsn/Dog Boot Dryer ESPHome
ESP Home firmware code to power a 3D printed, Home Assistant-connected dog and/or glove dryer.
esphome:
name: boot_dryer
platform: ESP8266
board: d1_mini
# WiFi connection, correct these
# with values for your WiFi.
wifi:
ssid: !secret ssid
password: !secret wifi_password
@jamestutton
jamestutton / centos_bstick.sh
Created July 6, 2018 08:53 — forked from vkanevska/centos_bstick.sh
Custom CentOS 7 bootable ISO / Support UEFI & Secure boot
#!/bin/bash
# create custom bootable iso for CentOS 7 with kickstart
if [ $# -lt 2 ]
then
echo "Usage1: $0 path2iso path2kickstart"
exit 1
else
if [ ! -f $1 ]
then