用8美元的智能插座来避免脑力衰退
Using an $8 smart outlet to avoid brainrot

原始链接: https://www.neilchen.co/blog/kasa

我写了一个小型后台运行的脚本,用于轮询一个8美元智能插座的状态。插座侧面有一个开关,可以手动切换开关的开启和关闭。它连接到WiFi,因此可以通过API读取插座的状态。当你打开开关时,脚本会更新 /etc/hosts 文件,有效地阻止你选择的网站: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 你可以将插座插入任何插座,最好是离你比较远的地方。现在,每当我想要访问我封锁列表中的网站时,都必须起身去关闭开关。或者,我可以手动编辑 /etc/hosts 文件,但这额外的一步会增加足够的阻力,让我重新考虑下意识的分心行为。

Hacker News上的一篇帖子讨论了使用廉价智能插座来对抗网络分心。原文描述了如何使用智能插座作为物理开关,通过脚本切换网站阻止功能,从而增加冲动浏览的阻力。 评论者分享了他们自己的策略,从简单的`/etc/hosts`编辑到One Sec(iOS)和Freedom.to等专用应用程序,这些应用程序会在允许访问被阻止的网站之前引入延迟或练习。一些人建议使用更强大的解决方案,例如自定义DNS服务器(dnsmasq,Pi-hole)或基于NFC标签的物理阻止(Foqos,Brick)。另一些人建议将插座与体育活动(例如跑步机)集成,以控制访问权限。 一个关键主题是增加摩擦以破坏习惯循环的重要性,许多人承认不同的解决方案适用于不同的人,这取决于冲动程度。这些方法的有效性取决于真正想要改掉这个习惯。一些人发现轻微的不便就足够了,而另一些人则需要几乎无法逾越的限制。一些人发现探索分心习惯背后的原因很有价值。
相关文章

原文

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

You can plug the switch into any outlet, ideally one far away from you. Now, whenever I want to visit a website in my blocklist, I have to physically get up and turn off the switch. Alternatively, I could just manually edit /etc/hosts, but this additional step adds just enough friction to make me reconsider reflexively distracting myself.

联系我们 contact @ memedata.com