Zhenyi Tan on Nostr: On the Gibberish server, I used AI to create a few shell scripts to manage UFW. ...
On the Gibberish server, I used AI to create a few shell scripts to manage UFW. (Because I never know how to write those awk-pipe-cut one-liners.)
One day, one of my scripts randomly stopped working. I later learned that when you have over 100 rules, UFW lists rule numbers below 100 with spaces, like [ 1], which the `awk {print $1}` in my script couldn't handle.
I could ask AI again to fix it, but what if it breaks in another, less obvious way? So I rewrote the script in Ruby. End of story.
Published at
2024-12-27 16:33:29Event JSON
{
"id": "3c5f7de1eb50b41a466d9f1bcb2dbc94f692d97c8997ce9c3e2265c64af314bf",
"pubkey": "ba9d498f21902a9836dea1ae3d1dd894e5507155cf229c47a8275ff8152f9a14",
"created_at": 1735317209,
"kind": 1,
"tags": [
[
"imeta",
"url https://files.mastodon.social/media_attachments/files/113/725/691/837/665/103/original/27b0eec27bc25d08.jpeg",
"m image/jpeg",
"dim 1117x711",
"blurhash U4P%LvD%~p%M~qxtxuM{?bazofofRj-;t7Rj"
],
[
"proxy",
"https://mastodon.social/users/zhenyi/statuses/113725748609084286",
"activitypub"
]
],
"content": "On the Gibberish server, I used AI to create a few shell scripts to manage UFW. (Because I never know how to write those awk-pipe-cut one-liners.)\n\nOne day, one of my scripts randomly stopped working. I later learned that when you have over 100 rules, UFW lists rule numbers below 100 with spaces, like [ 1], which the `awk {print $1}` in my script couldn't handle.\n\nI could ask AI again to fix it, but what if it breaks in another, less obvious way? So I rewrote the script in Ruby. End of story.\n\nhttps://files.mastodon.social/media_attachments/files/113/725/691/837/665/103/original/27b0eec27bc25d08.jpeg",
"sig": "4a0b311d85dd34f27de1c9eb3eaaf9ed15ae394a0cf48809bc071ee84975b944352ea0dd1a5d97f2b34f68aaeb874b5f01faed644d6ae5cd1e1285288ab92818"
}