They promised rain. I ain’t seeing any rain so far. 🫤
@rrraksamam@twtxt.net So ready for winter. 🥵
@falsifian@www.falsifian.org Exactly! 🥳
So this works:
$ bash -c 'set -u; bar=1; foo=$bar; if [[ "foo" -eq "bar" ]]; then echo it matches; fi'
it matches
Without the misleading quotes:
$ bash -c 'set -u; bar=1; foo=$bar; if [[ foo -eq bar ]]; then echo it matches; fi'
it matches
As does this:
$ bash -c 'set -u; bar=1; foo=$bar; if (( foo == bar )); then echo it matches; fi'
it matches
What the person originally meant was what bender said:
$ bash -c 'set -u; foo=bar; if [[ "$foo" = "bar" ]]; then echo it matches; fi'
it matches
It’s all rather easy once you’ve understood it … but the initial error message of the initial version can be quite unexpected.
Ready for Winter
@bender@twtxt.net So far, so good! And why did it complain about bar
being a variable?
I love shell scripts because they’re so pragmatic and often allow me to get jobs done really quickly.
But sadly they’re full of pitfalls. Pitfalls everywhere you look.
Today, a coworker – who’s highly skilled, not a newbie by any means – ran into this:
$ bash -c 'set -u; foo=bar; if [[ "$foo" -eq "bar" ]]; then echo it matches; fi'
bash: line 1: bar: unbound variable
Why’s that happening? I know the answer. Do you? 😂
Stuff like that made me stop using shell scripts at work, unless they’re just 4 or 5 lines of absolutely trivial code. It’s now Python instead, even though the code is often much longer and clunkier, but at least people will understand it more easily and not trip over it when they make a tiny change.
@lyse@lyse.isobeef.org Neato! Too bad they’re in the northern sky. Can’t see that from my bedroom. 😂
🧮 USERS:1 FEEDS:2 TWTS:1060 ARCHIVED:77372 CACHE:2407 FOLLOWERS:17 FOLLOWING:14
@johanbove@johanbove.info Allegedly it’s supposed to cool down mid-week, yeah. If we consider ~28°C “cool”, that is. 😅
Fan = Miefquirl. 😏
@prologic@twtxt.net 35°C outside. 🫤 I’m just gonna sit here and wait for November. 😂
It is too hot to think. 🥵
🧮 USERS:1 FEEDS:2 TWTS:1059 ARCHIVED:77355 CACHE:2411 FOLLOWERS:17 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1058 ARCHIVED:77343 CACHE:2415 FOLLOWERS:17 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1057 ARCHIVED:77312 CACHE:2393 FOLLOWERS:17 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1056 ARCHIVED:77295 CACHE:2392 FOLLOWERS:17 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1055 ARCHIVED:77277 CACHE:2385 FOLLOWERS:17 FOLLOWING:14
🧮 USERS:1 FEEDS:2 TWTS:1054 ARCHIVED:77272 CACHE:2420 FOLLOWERS:17 FOLLOWING:14
I would like to work on my Mastodon and TWTXT script to improve it.
Hello, IT, have you tried turning it off and back on again?
I finally gave in and tried out Caddy. It’s about as great as everyone says it is.
Note to self, don’t park on a hill in neutral with handbrake off
I’m working on getting my twtxt.txt file up to https://yarn.social standards so that it will be more than yelling in the wind.
I have figured out how to configure my twtxt config so that I can make slightly longer posts.
CrowdStrike attempts takedown of parody site
Article URL: https://clownstrike.lol/crowdmad/
Comments URL: https://news.ycombinator.com/item?id=41133917
Points: 500
# Comments: 90 ⌘ Read more
I think we are live now. I dont have any corporate, or fediverse, socials right now and I dont think I will. This will be a record rather than something that I expect people to see.
I made my first post, and I hope it goes fine
This is my last test of the day
This is a test
One-man SaaS, 9 Years In
Article URL: https://blog.healthchecks.io/2024/07/running-one-man-saas-9-years-in/
Comments URL: https://news.ycombinator.com/item?id=41104293
Points: 504
# Comments: 89 ⌘ Read more
bashsimplecurses: A simple curses library made in bash to draw terminal interfaces
Comments ⌘ Read more
actionview-svelte-handler: Create Svelte views seamlessly in Rails applications
Comments ⌘ Read more
Minimal 64x4 – DIY computer with 4x the processing power of a C64 or Apple II
Video: https://www.youtube.com/watch?v=L1oECH6rPvs
In-depth video: https://www.youtube.com/watch?v=duPr5kViBVU