Skip to content

Instantly share code, notes, and snippets.

View ErikFontanel's full-sized avatar

Erik Gelderblom ErikFontanel

View GitHub Profile
@ErikFontanel
ErikFontanel / README.md
Last active September 5, 2021 14:20
Firefly backup and restore scripts

firefly-backup

This script automatically creates a tar.gz archive of the firefly database and copies it to a secure offsite location.

It does NOT save the encryption key. Store that somewhere else securely (e.g. password manager).

I have firefly-backup running via a daily cronjob.

firefly-restore

This restores a .tar.gz backup of the firefly database to a docker volume. The script takes the filename of the backup as an argument and assumes a static location where those files are found.

@ErikFontanel
ErikFontanel / firewall-start.sh
Last active July 31, 2018 13:08
Block Google DNS on R7800
#!/bin/sh
# Use together with Voxel Firmware
# Symlink this file from optware root to /root/firewall-start.sh
# Make script executable with chmod +x
#
# More info: https://www.reddit.com/r/pihole/comments/930g2z/psa_google_services_including_ads_and_others_try/
iptables -t nat -I PREROUTING -i br0 ! -s 192.168.1.13 -p tcp --dport 53 -j DNAT --to 192.168.1.13
iptables -t nat -I PREROUTING -i br0 ! -s 192.168.1.13 -p udp --dport 53 -j DNAT --to 192.168.1.13
@ErikFontanel
ErikFontanel / docker.zsh
Created August 31, 2018 12:40
Start docker daemon if it's not already when docker-compose up is ran
#!/bin/bash
# spinner
# @see https://stackoverflow.com/questions/238073/how-to-add-a-progress-bar-to-a-shell-script
sp="/-\|"
sc=0
spin() {
printf "\b${sp:sc++:1}"
((sc==${#sp})) && sc=0
}
@ErikFontanel
ErikFontanel / README.md
Created November 24, 2018 14:44
Fysetc F6 v1.3 platform.io configuration

Fysetc F6 v1.3 for platform.io

Instructions for compiling Marlin for the Fysetc F6 using Platform.io and VSCode or Atom.

Add a new custom board to Platform.io

  1. Add fysetcf6_13.json to the platformio boards directory ~/.platformio/boards in your home folder.