Get the latest tech news
Using an $8 smart outlet to avoid brainrot
I wrote a small script that runs in the background, polling for the state of an $8 smart plug. It's got a switch on the side to manually toggle the switch on and off.
It connects to WiFi, so you can read the state of the plug via API. When you turn the switch on, the script updates/etc/hosts to effectively block websites of your choosing: Alternatively, I could just manually edit/etc/hosts, but this additional step adds just enough friction to make me reconsider reflexively distracting myself.
Or read this on Hacker News