Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: 127 Clear Filter

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: 127.0.0.1 www.twitter.com 127.0.0.1 x.com 127.0.0.1 instagram.com 127.0.0.1 youtube.com 127.0.0.1 reddit.com