shakedown.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
A community for live music fans with roots in the jam scene. Shakedown Social is run by a team of volunteers (led by @clifff and @sethadam1) and funded by donations.

Administered by:

Server stats:

288
active users

#scripting

6 posts5 participants0 posts today

New Kitten Release 🥳

kitten.small-web.org

(Run `kitten update` to update your dev machines. Production machines will automatically update in a couple of hours.)

• You can now add a generic script block to your markdown pages (see mastodon.ar.al/@aral/114432417)

• Markdown pages can now be `KittenPage` instances and attach `KittenComponent` instances (so you get a full server-side component hierarchy with an event-based workflow; ideal for authenticated pages where you can be use only the author of the page will be accessing them and thus the additional memory and processing overhead are not issues. Isn’t the Small Web great? Only having instances of one makes it possible to optimise so many things for the human experience instead of vertical scale of the data farming machine.)

• Two new examples showcase the new features: codeberg.org/kitten/app/src/br and codeberg.org/kitten/app/src/br

• Attributes with object values are no longer serialised into the DOM (but your components’ render functions will continue to receive them, of course.) This is because only string values make sense for attributes in the context of the HTML DOM. (You can still, of course, have stringified representations of objects in attributes, as used by the `data` attribute to pass data from nodes to event handers on the server.)

kitten.small-web.orgKitten: Home

I was looking for an alternative to classic shell scripts, so I timed a Hello World program in different languages for fun. I thought you might want to know:

1 ms - #Bash
1 ms - #Perl
12 ms - #Python
33 ms - #Go (shebang calling `go run`)
38 ms - #C (shebang compiling to temporary file)
61 ms - #Rust (shebang compiling to temporary file)

Needless to say that this is a highly unfair and silly comparison. It's still interesting, though.

Finally, finally, I've mastered the #moss sex without using complicated technical terms. Now it's time to ask the #tardigrade more questions. Then scripting the outro. The final spurt.
In the evenings and during breaks, I create the sound design for the episode (in thoughts).
Sleep is overrated, coffee undervalued. 😂

Tomorrow a disaster day of proofreading between multiple appointments.
I'm my own worst critic.
Then sleep. A voice needs sleep.

Today I learned from the flock(1) man page (on Debian) that you can put this line at the top of a shell script to prevent more than one copy of it from ever running at a time:

[ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -en "$0" "$0" "$@" || :

This is an extremely clever hack and I don't know how I've never stumbled upon it in 38 years of writing shell scripts.
#unix #linux #scripting #shellScripting

💡 Idea for a debugging script 💡

This might already exist for FreeBSD, and if so.. let me know!

- 1) keeps record of OS core/default settings: loader.conf, rc.conf, sysctl.conf, devfs.rules, login.conf etc
- 2) keeps record of file checksum on those OS core files (similar to the app, tripwire)
- 3) mode which shows divergence on current state vs known-default state in configs (1) and checksums (2)
-4) mode which tracks the files and their change-sets over time, similar to a zfs snapshot but at a single file-level

I'm in love with uv. Seriously, the tool is small yet packs a punch with features.

I'm writing an article for Fedora Magazine about the cool things you can do with uv, here is the source code (with the article in markdown) for your enjoyment:

github.com/josevnz/tutorials/t

GitHubtutorials/docs/Enhancing_Your_Python_Workflow_with_UV_on_Fedora at main · josevnz/tutorialsTutorials. Contribute to josevnz/tutorials development by creating an account on GitHub.
#uv#python#textual

a useful tip?
I spent today in the guts of a WordPress website...

If you ever want to block an action that is controlled by
if variable == 'yes'
you don't need to know about the calling functions. Just change 'yes' to something the calling functions will never send. I used 'fred', which will be easy to find in the file if for some reason I ever want to turn the functions back on.