Skip to content

Instantly share code, notes, and snippets.

View raldone01's full-sized avatar

raldone01

View GitHub Profile
@GregorB54321
GregorB54321 / hdd-state
Created April 18, 2025 20:45
getting HDD's spin state
#!/usr/bin/bash
DRIVE_ID[0]=/dev/disk/by-id/wwn-0x50014ee2ae42a608 # 2TB Disk model: WDC WD20EADS-00S
DRIVE_ID[1]=/dev/disk/by-id/wwn-0x50014ee20a7836a8 # 4TB Disk model: WDC WD40EZRX-00S
DRIVE_ID[2]=/dev/disk/by-id/wwn-0x5000c500b1841369 # 8TB Disk model: ST8000NM0055-1RM
DRIVE_ID[3]=/dev/disk/by-id/wwn-0x5000c500b1844fe1 # 8TB Disk model: ST8000NM0055-1RM
DRIVE_ID[4]=/dev/disk/by-id/wwn-0x5000c500b185901f # 8TB Disk model: ST8000NM0055-1RM
for DRIVE_NUM in "${!DRIVE_ID[@]}"; do # init some variables
DRIVE_STATE_OLD[$DRIVE_NUM]=""
@hermanbanken
hermanbanken / Dockerfile
Last active April 15, 2025 21:49
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@afig
afig / customBadges.md
Last active April 10, 2025 17:36
Creating a Custom Badge for GitHub Projects

Custom Badges

The Shields service (at shields.io) provides a way to create custom badges for your projects. These are badges are very common and are frequently used to show status information about the project, or demonstrate tools that were used for the development of your project.

Example badge:

Creating a badge