The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,861 other subscribers

Archive for the ‘Scripting’ Category

fail2ban is yet another “A project some … person … has been thanklessly maintaining since …”; ensure it does not become yet another XZ Utils debacle

Posted by jpluimers on 2024/07/17

https://i0.wp.com/web.archive.org/web/20240711133830if_/https%3A//www.explainxkcd.com/wiki/images/d/d7/dependency.pngEarlier this week there were only three sponsors for [Wayback/Archive] sebres (Sergey G. Brester) · GitHub.

You might think “Why is this important?”.

Sergey is the single maintainer of fail2ban, the open source project that protects countless (likely a majority) of  public facing servers facing on the Internet.

Please don’t let fail2ban become another XZ Utils and support Sergey: we don’t want the project to become unmaintained, or worse: being backdoored like XZ was.

[Wayback/Archive] Sponsor @sebres on GitHub Sponsors · GitHub

The fail2ban repository is at [Wayback/Archive] GitHub – fail2ban/fail2ban: Daemon to ban hosts that cause multiple authentication errors

Via [Wayback/Archive] dee 🏳️‍⚧️: “fail2ban has one core maintain…” – Grafana Social

fail2ban has one core maintainer github.com/fail2ban/fail2ban and he has only 3 Github sponsors github.com/sebres

WTF

I can’t even comprehend how many servers are protected by fail2ban, how many compromises are avoided, how many people who run hobby things all the way up to major sites that get to sleep soundly every night… because of this single project.

Related: XZ 5.6.x are backdoored and present in many systems: downgrade to 5.4.x or earlier now; consider libarchive compromised until proven otherwise

--jeroen

Read the rest of this entry »

Posted in Development, Python, Scripting, Software Development | Leave a Comment »

On my list of tools to try: zhot and tweetzhot (both by Rop Gongrijp and based on puppeteer) to create browser screenshots from the terminal

Posted by jpluimers on 2024/07/17

The feature reminds me on how archive.today saves content.

Both the zhot and tweetzhot repositories are on my list of tools to try. They might make writing blog posts easier.

They are both based on [Wayback/Archive] puppeteer/puppeteer: Headless Chrome Node.js API

Puppeteer is a Node library which provides a high-level API to control Chrome or Chromium over the DevTools Protocol. Puppeteer runs headless by default, but can be configured to run full (non-headless) Chrome or Chromium.

It demonstrates headless browser usage and can for instance:

  • Generate screenshots and PDFs of pages.
  • Crawl a SPA (Single-Page Application) and generate pre-rendered content (i.e. “SSR” (Server-Side Rendering)).
  • Automate form submission, UI testing, keyboard input, etc.
  • Create an up-to-date, automated testing environment. Run your tests directly in the latest version of Chrome using the latest JavaScript and browser features.
  • Capture a timeline trace of your site to help diagnose performance issues.
  • Test Chrome Extensions.

Note any headless browser will have some trouble rendering single-page applications.

Repositories:

Read the rest of this entry »

Posted in Chrome, Chrome, Development, Google, JavaScript/ECMAScript, Power User, Puppeteer, Scripting, Software Development, Web Browsers | Leave a Comment »

s3-ocr: Extract text from PDF files stored in an S3 bucket

Posted by jpluimers on 2024/07/16

For my link archive: [Wayback/Archive] s3-ocr: Extract text from PDF files stored in an S3 bucket

One reason is archival of books. Even (or maybe especially) in IT, books already have historic meaning especially in narrower fields where they often are not available in the Internet Archive or have been scanned by Google Books.

Via/related:

Read the rest of this entry »

Posted in Amazon S3, AWS Amazon Web Services, Cloud, Cloud Apps, Development, Infrastructure, Internet, Power User, Python, Scripting, Software Development | Leave a Comment »

Important to defeat Twitter wrongly auto-guessing of URLs (and assuming anything with @ or # is a mention or hashtag) is Nelson’s Weblog: tech / zero-width-space

Posted by jpluimers on 2024/07/11

Quoting in full from [Wayback/Archive] Nelson’s Weblog: tech / zero-width-space to demonstrate a zero-width-space problem with WordPress too.

Read the rest of this entry »

Posted in Bookmarklet, Classic editor, Development, Gutenberg editor, JavaScript/ECMAScript, Power User, Scripting, SocialMedia, Software Development, Twitter, Web Browsers, Web Development, WordPress | Leave a Comment »

Should be easy to put in a Bookmarklet: Archive.is blog — What is the long version of the url please. …

Posted by jpluimers on 2024/07/10

[Wayback] Archive.is blog — What is the long version of the url please. …

Click on “share” button to see different forms of linking to a page.

For example https://archive.vn/Aoans/share

So there are two tricks:

Read the rest of this entry »

Posted in Bookmarklet, Development, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers | Leave a Comment »

Installing WhatsApp Desktop from the Console

Posted by jpluimers on 2024/07/09

Related to WhatsApp Desktop for Mac or PC cannot only chat but also voice and video call: installing WhatsApp from the command-line.

That was easy to do via winget:

c:\temp>winget install -e --id WhatsApp.WhatsApp
Found WhatsApp [WhatsApp.WhatsApp] Version 2.2222.12
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://web.whatsapp.com/desktop/windows/release/x64/WhatsAppSetup.exe
  ██████████████████████████████   145 MB /  145 MB
Successfully verified installer hash
Starting package install...
Successfully installed

This was a while ago, so the version number by now is dated, but it is about the command winget install -e --id WhatsApp.WhatsApp

Via:

–jeroen

Posted in Batch-Files, Development, Power User, Scripting, Software Development, Windows, Windows 10, Windows 11, winget | Leave a Comment »

Reminder to self: write a Bookmarklet that shortens YouTube URLs to the youtu.be ones

Posted by jpluimers on 2024/07/02

When sharing YouTube videos via the mobile apps, they are shortened using the youtu.be domain.

So this is a reminder to write a Bookmarklet based URL-shortener myself for this and extend it so it also understands the various YouTube URL parameters (like start time).

The transformation is documented:

Read the rest of this entry »

Posted in Bookmarklet, Conference Topics, Conferences, Development, Event, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development | Leave a Comment »

Lots of interesting programming learning games links via b0rk on Twitter

Posted by jpluimers on 2024/06/25

Every once in a while, b0rk (Julia Evans, of [Wayback/Archive] wizard zines fame) asks interesting questions like below that results in lot of cool links.

I have blogged assemblies of them before (see for instance Lots of interesting git links via b0rk on Twitter) and this one is no different:

[Wayback/Archive] Julia Evans on Twitter: “what are some helpful programming learning games? thinking of things like mystery.knightlab.com for SQL, and flexboxfroggy.com, and ohmygit.org especially interested in games that have helped you learn something”

The response was overwhelmingly good (I tried to indicate when games are not free or not playable from a web browser). I summarised it below.

Read the rest of this entry »

Posted in *nix, *nix-tools, Conference Topics, Conferences, CSS, Database Development, Development, DVCS - Distributed Version Control, Event, Games, git, Multi-Threading / Concurrency, Power User, RegEx, Scripting, sh, Sh Shell, Software Development, Source Code Management, SQL, Web Development | Leave a Comment »

Converting html div tables to normal tables

Posted by jpluimers on 2024/06/12

Sometimes normal html tables are better suited than the more style friendly div tables, as they better suit the underlying data and are easier when you need column or row spans using the colspan and rowspan html attributes, explain semantics better, and … display as tables even without styling!

Converting from div tables to normal html tables is not as straightforward than from normal html tables to div tables.

So here are some links that helped me with both div tables and the conversion:

–jeroen

Posted in Development, HTML, JavaScript/ECMAScript, jQuery, Scripting, Software Development, Web Development | Leave a Comment »

maartensukel/example-textual-classification-citizen-reports: Example of a simple textual classification using TF-IDF and LR.

Posted by jpluimers on 2024/06/04

Cool technology:

[Wayback/Archive] maartensukel/example-textual-classification-citizen-reports: Example of a simple textual classification using TF-IDF and LR.

The classification is done by using a TF-IDF (Term Freuqency – Inversed document frequency) as representation for the text and a logistic regression to classify the text. Optimal hyperparameters for the dataset are found using a gridsearch.

Author: [Wayback/Archive] Maarten Sukel (@MaartenSukel) / Twitter

The source is based on Python Pandas and sci-kit learn (also known as sklearn).

Read the rest of this entry »

Posted in Development, Pandas, Python, Scripting, Software Development | Leave a Comment »