Bash is the worst pile of anti-patterns and hacked up bullshit, but what would you expect from something that’s been our emergency-room band-aid for as long as we’ve been alive? This is just a reminder, for your career’s sake, to NOT make it one of your “specialty languages”. Learn what you have to. And double down on a modern, sane scripting language. I’ve tooled up node to do all things command-line, I recommend you do the same – but even writing little Java or C++ command-line apps is better than letting bash poison your brain! Just say no. And some day, our great-great-grandchildren will have a replacement. No, not another sh variant. A true sane modern programming language. okbyeeee!

Hate of the day: I love how [rm -f ] “fails” (non-zero error code) but [mkdir -p …] “succeeds”, and there is no [mv -f …]. The Unix philosophy: do one thing, and do it well, but always slightly differently than anyone else would have done it. Sure it’s bizarre bazaar chaos, but it’s “beautiful”. Ummmm…. no, fuck you, I don’t want to memorize your chaos.

UPDATE: Dude. In my defense I was in pain and jacked on meds when I wrote this, haha. Step away from the oxy, take less Adderall… calm ye self down. “Whatever Works”.

UPDATE 2: Yeah, the horror is real. Yet another damning example of why, for your career’s sake, you should focus on a real scripting language and not (ba)sh’s arbitrary stupidity.

From zero to new-domain-with-gmail-backed-email:

  • Register your brilliant name (like mine, shitcutter.com) at domains.google.com (ok i lied, that sets you back $12/yr). Hey look, diarrhea.gripe is available!
  • Create a new google account for it, something like myshitcutter@gmail.com
  • Domains > Email > Email forwarding > add email alias:
    bossman -> myshitcutter@gmail.com
  • Google account avatar > manage your account > security > Signing into google:
    Turn on 2fa if it is not already on (they will keep shoving this on us, capitulate.)
    App Passwords > app: Mail, device: Custom, name: shitcutter.com
    (NOTE I had to futz with form to get name field to show up.)
    Copy the 16-digit code that you get.
  • Gmail settings > accounts > Send mail as: > Add
    The second page of the forms will ask for SMTP server, use stmp.google.com, default port, username myshitcutter, paste key from prev step.
  • Validate email as requested.
  • From gmail, you can now send and receive using <bossman@shitcutter.com>. You can keep going if desired if you want to add one or a bazillion other users at that domain.

Congratulations! Now you’ve guaranteed that the biggest big brother the human race will ever know, outside of the US government, can read your every thought, in realtime. And don’t worry, they’ll pass it all on, proactively, to the government, for free.

UPDATE: do this too:

The thread_local scope tells the compiler to create one unique version of a variable per thread. Then you can access it without worrying at all about in what thread you are. (Grammar Nazis, help me out here. I think I got that right…) It is absolutely genius for making multi threaded programming that much easier. W00t.

UPDATE: of course, every razor blade comes with its share of nicks. In this case, the expectation that different objects in the same thread would still have different thread_local members. Nope! Vet your ideas before you change to this scope too fast! Me, I’m all better now, and still love it. Good luck girls and boys.

Example to convert a field from real type to integer type:

update bracketevents set json = jsonb_set(json, '{sq_id}', ((round(cast(json->>'sq_id' as real))::text)::jsonb)); 

All that just remove the $*(@ decimals… how particular…