Skip to content

Instantly share code, notes, and snippets.

View Sinistral2099's full-sized avatar

Sinistral2099 Sinistral2099

View GitHub Profile
@rafaelbiriba
rafaelbiriba / tree-report.sh
Last active September 22, 2024 20:20
Generate tree report file on NAS and send it by email (optional)
#!/bin/bash
# Creates DISK0.tree, DISK1.tree, DISKx.tree inside each disk, with the output of tree command.
# After generating the report, it send via email using mail.
# To add more disks, just add DISK[x]=/full/path to the disk. Just make sure that the array index are sequencial.
# Why this?
# With the reports from tree, in case of disk failure, you will know which file got lost and you can recover them, downloading or via backups.
# GIST: https://gist.github.com/rafaelbiriba/0ee7ca2baec1ef80a878c825295f09e1
EMAIL_ADDRESS="" # EMAIL_ADDRESS="[email protected]" or leave it blank "" to disable email
DISKS[0]="/srv/dev-disk-by-id-ata-WDC_WD80EMAZ-00WJTA0_ABC123-part1"
if(!state.timer) {
state.timer = {
timercount: 180,
timerinterval: ""
}
}
else {
state.timer = {
timercount: 180,
timerinterval: ""
@MOOOWOOO
MOOOWOOO / py-gitignore
Last active April 30, 2025 01:44
python pycharm gitignore
# Created by .ignore support plugin (hsz.mobi)
### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
@kalinchernev
kalinchernev / countries
Created October 6, 2014 09:42
Plain text list of countries
Afghanistan
Albania
Algeria
Andorra
Angola
Antigua & Deps
Argentina
Armenia
Australia
Austria