Dynamic DNS (DDNS) with CloudFlare for PPPoE Connections

You maybe wondering what I mean by dynamic DNS for PPPoE connections, well, when you connect to your Internet provider using PPPoE, your public IP address may or may not be dynamic, it means that it will change each time you have to reconnect. PPPoE connections can stop working by several reasons, when this happens your ppp daemon will try to reconnect. At this point, your connection is established, but your public IP maybe a new one, if you are self-hosting sites at home behind your Internet router, this change of your public IP can disrupt the availability of your site.

Mirroring Git Repositories

There are projects where having a working git repository separated from the customer repository is a requirement. For this cases, I am using the following script to parse a YAML file repos.yml and keep the repositories in sync. #!/usr/bin/env bash function json { local file=$1 local json=$(cat $file | python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)') echo ${json} } JSON=$(json "repos.yml") repos=$(echo ${JSON} | jq -r 'keys[]') for repo in $repos; do if [[ !

Systemd Suspend Hook to Fix WiFi Arch Linux

My macbook running Arch Linux is currently having problems with the WiFi after resume from suspend. Systemd provides a mechanism to run executable files before and after suspend or hibernation. /usr/lib/systemd/system-sleep This mechanism relies on the system service systemd-suspend.service, this service will run all executable files in /usr/lib/systemd/system-sleep/. Two arguments are going to be passed to the script, before suspend the execution will look to something like: /usr/lib/systemd/system-sleep/wifi-hook.sh "pre" "suspend" After suspend, the execution will be: