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
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.
@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 / 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 / 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 / filter-youtube-domains.sh
Last active November 28, 2023 18:55
Pi-hole Youtube ad blocking
#!/bin/sh
# This script will fetch the Googlevideo ad domains and append them to the Pi-hole block list.
# Run this script daily with a cron job (don't forget to chmod +x)
# More info here: https://discourse.pi-hole.net/t/how-do-i-block-ads-on-youtube/253/136
# File to store the YT ad domains
FILE=/etc/pihole/youtube.hosts
# Fetch the list of domains, remove the ip's and save them
curl 'https://api.hackertarget.com/hostsearch/?q=googlevideo.com' \
@ErikFontanel
ErikFontanel / apfd.conf
Last active January 4, 2020 16:55
Time Capsule on optware
;
; Netatalk 3.x configuration file
;
[Global]
; Global server settings
; Inspiration and background:
; http://blog.khubla.com/freebsd/time-machine-backups-using-freebsd-zfs
;
; create group tmusers, add users
@ErikFontanel
ErikFontanel / instructions.md
Last active July 12, 2023 08:28
run jottacloud-command-line-tool on busybox/optware
  1. Install ca-bundle opkg update && opkg install ca-bundle if not already installed for https
  2. Download the binary from https://repo.jotta.us/archives/linux/arm64/ and untar in /opt/jotta-cli
  3. cd into the jotta-cli dir
  4. Modify source=/usr/share/jottad to source="/opt/usr/share/jottad" /in ./usr/share/jottad/install.sh
  5. run ./usr/share/jottad/install.sh and ./usr/share/jottad/install-path.sh
  6. modify group=jottad to group=tmusers and add umask=0002 in /etc/init.d/jottad
  7. create the jottad data directory mkdir -p /opt/.jottad
  8. Start jottad with start-stop-daemon -b -x /opt/bin/jottad slow lowmem datadir /opt/.jottad -S (add this to /etc/rc.local to start automatically)
  9. Login jotta-cli login
@ErikFontanel
ErikFontanel / karabiner.json
Last active October 20, 2017 17:41
Varmilo VA68 Mac keyboard layout. Sets the command, option and control keys in the right place. Changes insert to home too. Add this under 'Simple Modifcations' to you keyboard profile for your Varmilo keyboard in karabiner.json.
"simple_modifications": [
{
"from": {
"key_code": "insert"
},
"to": {
"key_code": "home"
}
},
{
@ErikFontanel
ErikFontanel / TimberPatternLabLoader.php
Created July 28, 2017 14:07
Wordpress Timber Pattern Lab Pattern Loader
/**
* Custom PatternLab Loader for Timber
*
* How to use:
* Place this somewhere in your functions.php, make sure Timber WordPress plugin is installed and activated.
* This code assumes Pattern Lab is installed in the same directory as your theme.
* Change $patternlabSource below if you want to use a different path to Pattern Lab.
*
* This code hooks into Timber when Timber initialises the Twig_Loader_Filesystem
* uses default Timber loader if Pattern Lab patterns aren't found.
@ErikFontanel
ErikFontanel / README.md
Created December 13, 2016 16:28 — forked from zenorocha/README.md
A template for Github READMEs (Markdown) + Sublime Snippet

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage