Herr Bischoff

How to Create a Valid Filename From a Text String in POSIX Shell Script

This is a surprisingly involved operation that took some research to write the script successfully. It once again demonstrates both the power of pipes and the resulting compound commands as well as the quirks that core UNIX tools exhibit along with their somewhat archaic handling of regular expressions.

I’ve opted for using awk, sed and tr in a single pipe to keep this readable and to be able to understand what’s going on a year from today. Without a doubt, more concise solutions exist. I always prefer readable over clever.

$title="Some text that's not a (valid) filename - as is!"
echo $title | \
    tr '[:upper:]' '[:lower:]' | \
    tr ' ' '-' | \
    sed -E "s/[\,\.\"\'\!\@\#\$\%\^\&\*\(\)\{\}\=\;\:\<\>\/\?\`\~]//g" | \
    tr -d '\[' | \
    tr -d '\]' | \
    sed -E "s/-{2,}/-/g" | \
    awk '{$1=$1;print}'

The above approach focuses on the most common ASCII characters used in written text and adjusts for shortcomings of sed and tr. The final awk statement is present for brevity, as this is the shortest solution I’ve found to trim preceding and trailing whitespace.

Broadcast2World Spam Email

Like I started way back then with the Advids spam outfit, I’m reporting on particularly obnoxious attempts at unsolicited commercial email. Today, we have a specimen from Hector Williams of Broadcast2World:

Hi [NAME],

Just wondering if you received my previous emails?

It’s tough to remain true to the Science and Compliant yet keep it Simple, Engaging, and Inspiring for your audience.

We strategically add elements to grab attention right at the beginning of your video, retain it (we leverage 25+ proven techniques from Hollywood screenwriters), and end on an emotional high with an inspiring message and a strong CTA.

We handcraft animated videos (www.b2w.tv) to help you tell stories that simplify your message, skyrocket your engagement, and make your audience care.

Please can we schedule a quick meeting sometime this week whenever you’re free?

Regards,
Hector Williams
Chief Storyteller at b2w.tv

On Monday, March 13, 2023 at 2:46 PM, Hector Williams <hector.williams@broadcast2world.us> wrote:

Hi Erin,

This is Hector Williams from Broadcast2World and I am personally reaching out to you again because I see a strong fit between irulan.net & Broadcast2World.

It’s difficult to truly connect with your audience especially when they cannot completely comprehend how your solution benefits them or makes their life easier.

That’s where Broadcast2World (www.b2w.tv) steps in with a team of experts in business, technology, and science storytelling, with proven experience in developing effective marketing videos to help you simplify your message, and build trust with your target audience.

Erin, please suggest a date/time that best suits your calendar.

All the best, Hector Williams Chief Storyteller at b2w.tv

On Tuesday, March 7, 2023 at 1:23 PM, Hector Williams <hector.williams@broadcast2world.us> wrote:

Hi Erin,

Video is the most powerful communication tool, yet most marketing videos are boring. What are most marketers missing?

What if you could give them goosebumps, engage them emotionally, communicate convincingly, and inspire them?

Our storytelling formula can turn your video into an engaging mini-movie that positions your offering as a magical gift.

Having created thousands of videos for companies like irulan.net, we have accumulated valuable experience in this field.

Erin, I would love to discuss how we have enabled some of the best brands in your space to garner thought leadership.

Please let’s schedule a meeting at a time of your convenience.

Regards,
Hector Williams
Broadcast2World Inc
371 Hoes Lane, Suite 200
Piscataway, New Jersey - 08854
-------------------------------------------
You may unsubscribe to stop receiving our emails.

I love everything about this.

The clumsy attempt at making this look like this person tried to get in touch several times already. The gobbledygook about science and compliance. The self-appointed title of “chief storyteller”. The touch of “personally” reaching out to me makes me feel very special indeed.

Well, as always, I didn’t have any prior contact to this person or the company. I’m not running a business website. The domain name mentioned is one I haven’t used in years. The email was sent to a person that doesn’t exist and was caught by a catch-all alias.

Here’s the domain names to block:

b2w.tv
broadcast2world.us

They have also been added to my spam list that’s free for all to use:

https://git.herrbischoff.com/trackers/plain/spam.txt

On Honesty and the Lack Thereof

WebPageTest was a trusted tool that I used to use from time to time to check the state of websites I built. It’s a useful service. I understand that nothing is free and running a service costs money. Donations seldom cover operational costs, let alone work hours. I get it, have been there before myself and empathise fully.

Dishonesty is something I refuse to cope with — both professionally and personally. That’s what appears to be going on with today’s WebPageTest. For a week straight, I tried using it. There’s an inviting form for your URL and several options on the landing page.

No matter what you select, you are always greeted with

Oops! There was a problem with the test. You’ve reached the limit for logged-out tests this month, but don’t worry! You can keep testing once you log in, which will give you access to other nice features like […]

There’s no “problem” and I’ve reached no “limit”. If the initial limit is zero, it’s the default state, reached even before using whatever promised reward. The form is a lie, wasting time, in the hopes I will sign up for yet another account on yet another website. The ultimate goal here is upselling.

This is a pattern I encounter all over the internet and in daily life. It’s as old as human societies, it’s the “bait and switch” scheme. It’s a scam. Sure, in this instance, it just wastes some of your time and isn’t aggressive, but its premise is still based on being dishonest.

What a way to try to begin a business relationship.

How to Disable the Insecure Login Warning in Firefox

Since it repeatedly annoys me to great effect, this is a reminder to myself as well as anyone looking to do the same. While locally developing web content, logging in to a CMS backend, you may have experienced this overlay:

This connection is not secure, Logins entered here could be compromised.

It won’t go away until clicked upon, which opens a website with further information. Useful for end users, frustrating for developers.

  1. Open about:config in Firefox.
  2. Search for key security.insecure_password.ui.enabled.
  3. Double-click the found entry and set to false.

Distraction Free Writing Apps

There’s a niche of writing applications that claim to focus on the writing experience. They come in all shapes and sizes and opinions, just like humans do. I took the time to look through about a dozen of them. I put them through their paces and tried writing with them.

Instead of writing a long post about the pros and cons of each piece of software, I present you my conclusion. After all, most of us don’t have the time for endless musings on software and personal opinions on everything under the sun. Here’s my condensed opinion though.

All the distraction-free writing apps are crap.

They either

  • miss important core feature,
  • have too many features,
  • require a custom theme format just to change the typeface,
  • expect a recurring subscription,
  • insist on organising files in a proprietary database, or
  • just lack taste.

A surprising amount of them use Electron, which is essentially no different from running a website built with JavaScript in the Chrome browser. The result: consuming more resources than a full Microsoft Office installation — for editing plain text. A task that the original Macintosh performed in 1984, complete with a GUI, in 128 kB of RAM. Running Microsoft Word. The overhead is stunning.

Further observations:

  • iA Writer is the least crap of the bunch but expensive. There’s no way to test-drive the iOS version.
  • FOSS software manages to fail with GUI even when there’s practically none to begin with.
  • Commercial software appears to follow weird incentives.

In the end, I landed on Neovim. Despite all its issues and sometimes annoying configuration, flaky behaviour with large files and restriction to a terminal shell, it turned out to be the most capable writing environment. No one is more surprised than me.

I guess the upside of this is that I don’t have to wonder if my writing tool of choice is ever going to vanish. Integrations with command line tools like vale, proselint and languagetool are fantastic. This works for me.

Let me know if you’re interested in my configuration. I may write it up. For the time being, here’s a screenshot.