Python

GoogleWiFi + Pi-hole and NordVPN

GoogleWiFi + Pi-hole and NordVPN

Hello friends, as I promised in my previous post I’m going to tell you about configuring GoogleWiFi router with a Raspberry Pi server acting as DHCP and DNS server / VPN gateway. While part related to NordVPN is vendor specific I feel it would not be too hard to use similar setup with any VPN provider. Feel free to skip VPN related part.

I’m not sponsored by NordVPN, instructions provided as is and as any information from the Internet should be used carefully.

Python. Threading. Function() Takes Exactly X Arguments (Y Given)

Was playing around running multiple threads in Python. Here is a part of script launching docker_cleanup(controller_name) function in a separate thread.

from threading import Thread
...
    threads = []
    for controller_name in controllers:
        # Remove container if it already exists
        t = Thread(target=docker_cleanup, args=(controller_name))
        threads.append(t)
        t.start()
    for t in threads:
        t.join()  # Block main thread while childs executed
...