Skip to content

Instantly share code, notes, and snippets.

@KpuCko
KpuCko / smartcheck.sh
Last active January 6, 2021 14:50 — forked from tommybutler/smartcheck.sh
Script to quickly scan the S.M.A.R.T. health status of all your hard drive devices in Linux (at least all the ones from /dev/sda to /dev/sdzz). You need smartctl installed on your system for this script to work, and your hard drives need to have S.M.A.R.T. capabilities (they probably do).
#!/bin/bash
# install the smartctl package first! (apt-get install smartctl)
UID=$(id -u)
if [ $UID -eq 0 ]
then
true
else
@KpuCko
KpuCko / convert_ip_to_cidr.sh
Last active June 27, 2019 07:46
Convert IP to CIDR
#!/bin/bash
# DOWNLOAD LIST FROM HERE
BLACKLIST_URL="http://www.squidblacklist.org/downloads/drop.malicious.rsc"
# THE LIST WITH IP ADDRESSES
BLACKLIST_FILE="drop.malicious.rsc"
# DO I HAVE TO DOWNLOAD IT
DOWNLOAD="yes"
@KpuCko
KpuCko / pyweb.sh
Last active May 12, 2017 10:31
Simple python HTTP server
#!/bin/sh
#
# pyweb: Starts simple HTTP server
#
# chkconfig: 345 97 03
# description: Starts simple HTTP server
#
# processname: pyweb
# pidfile: /var/run/pyweb.pid
#