Skip to content

Instantly share code, notes, and snippets.

#include <avr/interrupt.h>
#include <avr/sleep.h>
// Arduino IDE settings
// BOD: 1.8V
// Clock: 1.2 MHz
// ATTiny13 pins/legs
// Leg 8: VCC
// Leg 4: GND
#! /bin/sh
set +o noclobber
# ======================================================
# This script is intended to scan many pages
# over the ADF of a Brother MFC printer
# and save it in one pdf file.
# Tested with MFC-7360N
#
# This script is based on Marcwa19197's ones
# https://github.com/Marcwa19197/brother-skey-scripts/blob/master/scantofile-0.2.4-1.sh
@eloo
eloo / raspberry-pi-backup.sh
Last active September 9, 2017 15:55 — forked from eusonlito/raspberry-pi-backup.sh
Create Raspberry Pi backups using a script launched as a cronjob
#!/bin/bash
# Cron installation:
# 30 05 * * 0 /root/scripts/raspberry-pi-backup.sh >> /var/log/backup.log 2>&1
# Configuration
external="/mnt/backup" # Check if external storage is mounted
folder="$external/raspi" # Base backup folder
dev="/dev/mmcblk0" # Device to backup
days=60 # Delete backups older than X days
@eloo
eloo / node_exporter.default
Last active December 22, 2023 09:00
Init.d script for prometheus node exporter
# Set the command-line arguments to pass to the server.
ARGS='-web.listen-address=:9100 -collector.diskstats.ignored-devices="^(ram|loop|fd)\\d+$"'
# Prometheus-node-exporter supports the following options:
# -collector.diskstats.ignored-devices="^(ram|loop|fd|(h|s|v|xv)d[a-z])\\d+$": Regexp of devices to ignore for diskstats.
# -collector.filesystem.ignored-mount-points="^/(sys|proc|dev)($|/)": Regexp of mount points to ignore for filesystem collector.
# -collector.ipvs.procfs="/proc": procfs mountpoint.
# -collector.megacli.command="megacli": Command to run megacli.
# -collector.ntp.server="": NTP server to use for ntp collector.
# -collector.textfile.directory="": Directory to read text files with metrics from.
@eloo
eloo / merge_languages.py
Created December 4, 2016 18:08
OpenPHT language file merge
import re
ENGLISH_STRING_FILE = "OpenPHT/language/English_plex/strings.po"
GERMAN_STRING_FILE = "OpenPHT/language/German_plex/strings.po"
MESSAGE_CONTEXT_KEY = "msgctxt"
MESSAGE_ID_KEY = "msgid"
MESSAGE_STRING_KEY = "msgstr"