BLCL的博客小馆

标签 · stdoutbinance币安理财存U年化收益40% !!牛市躺着就是收钱,闲置资金记得放理财!立即注册立享收益!!

首页

关于

归档

stdout

tmux enables AIs to operate servers safely

We’ve all seen plenty of horror stories about AI trashing servers. Yet, there are still tedious tasks we’d love for AI to handle. To keep things safe, you have to manually copy-paste back and forth commands and outputs. Yet the current mainstream solutions usually involve "adding another layer": relay IO, intercepting dangerous commands or even using a sm..

更多
stdout

chat.est.im launches at 3.14

Long over due. But finally, it's here. Last year I saw an interesting thread on V2EX that utilize curl -N to display cool ANSI art, and I wondered how to make it "interactive". After a series of battle with AI coding agents, it's finally done. The project is located at https://chat.est.im/. You can try it with curl -NT. https://chat.est.im/hello. I wrote ..

更多
stdout

安全的Python3沙箱——eval

很早之前从 reddit 看到过有人吹 eval(expr.replace('__', ''), {'__builtins__': None}, {}) 这个写法其实很安全,当年没人能攻破沙箱。我这个水平肯定是不肯能了,现在有AI了,让 opus-4.6-thinking 试了下 The classic escape chain needs object.__subclasses__() → find a class with __init__.__globals__['os'] → os.system(). Every step past info disclosure is blocked: Vector Why it fails str.format() calling methods..

更多
stdout

isomorphic-git 实现 sparse checkout & commit

去年9月手搓了套blog评论系统 - req4cmt,可能是全世界很少见通过 git repo 文件本身存储评论内容,而不是 github issue。 git repo 文件 append 内容涉及到一个性能问题:repo作为整体,也就是历史所有全体评论,被 fetch, commit , push 的成本太高。如果只能修改其中的一个文件就好了。这就是 sparse checkout。git底层早就支持了,git 命令在2020年之后2.25.0+支持,但是 Cloudflare Worker 没法执行命令,也没文件系统,于是召唤AI跟我一起折腾。 大概用的这个 prompt: 核心目的是避免 clone 整个repo!! 注意在 cloudflare worker 上跑。和nodejs有点差别。 ..

更多
stdout

AI搞不懂人称代词

陪娃学英语,由于我没啥耐心,于是找了豆包跟他陪练。课程是New Concept English Book I Lesson 140(是的很old school),大概内容是: A提问: Are you tired? B没听清:What does he want to know C转述:He wants to know if you are tired. 我把课本截图给豆包,豆包很快明白这一课讲的是啥,我的prompt是:豆包你扮演A和B,我回答C,你指出我的语法错误之后换别的问题继续问我。 这样进行得很顺利,直到豆包问了这样一个问题: A: What can i do for you B: What does she want to know? C: ___ 甲:我能帮你干点啥不? 乙:她问的啥来着? ..

更多
stdout

Linux服务器各类“面板”

一直习惯手动敲,想尝试下各种面板 Redhat 的 Cockpit The following NEW packages will be installed: cockpit cockpit-bridge cockpit-networkmanager cockpit-packagekit cockpit-storaged cockpit-system cockpit-ws cracklib-runtime dconf-gsettings-backend dconf-service dns-root-data dnsmasq-base glib-networking glib-networking-common glib-networking-services gsettings-desktop-sche..

更多
stdout

python版的mtr(traceroute for macOS)

首先,我讨厌编译,我喜欢二进制,直到昨天我惊讶的发现macOS上一个 yes 命令都是接近100KB的大小。homebrew 一大坨东西还不一定每次都成功。 说起编译,这几天读到一些关于软件法律方面的风险。zhihu说如果你的工具的不针对“特定用途”,那么就可以用一定免责的说辞,但是如果你提供下载只能拿来恰好做某一件特别具体的事,那么工具的提供者就有连带责任。我想这也是为啥大部分开源软件都是提供源码吧。我这代码又不能直接用,开源是为了研究技术。你自己编译之后拿来敲不对劲的命令那是用户自己的选择了。 那么回到主题, mtr 作为居家旅行必备网络工具,它只提供源码分发。9年前研究过,用python写了demo,但是终究不是太成熟,现在有 AI ,几句话就完成了 https://github.com/est/t..

更多
stdout

尝试让AI手搓个TTF格式生成器

一个奇怪的需求:如何在浏览器判断一个字体是否支持某个字符? (原始需求是:遇到一些字符渲染错位问题,看起来是字体不支持,fallback 到别的去了。) 想到的方法是:用canvas渲染看宽度。但因为这个 fallback机制,所以更好的办法是拿一个已知的特殊字体去比对,如果fallback了说明不支持。 那么问题来了,这个 fallback font 你不可能下载一个包含所有字符的,那样体积会很大,所以最好是按需生成一个,只包含一个字符,用来比对。那么这个问题就转换成了:如何在浏览器js里动态生成一个 .ttf 格式的字体文件,只包含一个字符? 这里不考虑 woff woff2,因为前者已经过时了后者比 ttf 更复杂。 一开始以为很easy,让 ChatGPT搓,打开浏览器就懵逼 OTS parsi..

更多
stdout

精打细算VPS扫除

2022年买的VPS一直没怎么管,今天想跑点东西发现大户 warp-cli 真是吃资源啊。果断删掉 公司的服务器都是SA管理,自己的一般很少去折腾,这次也是闲的,好奇系统里杂七杂八都是啥玩意儿,挨个找AI审问一遍 systemctl list-units --type=service --state=running blk-availability udisks2 插拔优盘的 fwupd 固件更新 ModemManager multipathd open-iscsi iscsid 存储用的 packagekit GUI包管理器 polkit GUI 策略kit snapd snapd.apparmor snapd.autoimport GUI里的 App store lvm2-monito..

更多
stdout

I made a paste service

I've been busy vibe coding a paste service. Sharing content has been painful these days and I always have some snippets or images to share with my friends. The service is up and running in publick hosted $URL = https://p.est.im It's running on a free tier Cloudflare Worker with everything stored in D1. To upload a paste is easy, just curl -T /path/myfile..

更多
1235