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,862 other subscribers

Archive for the ‘Scripting’ Category

finding duplicates – voidtools forum

Posted by jpluimers on 2025/10/07

That feeling you have been living under a stone since 2014: [Wayback/Archive] finding duplicates – voidtools forum

1.4 Beta has both dupe: & sizedupe: functions.
(In the Index, you need to index the file size & also enable Fast size sort.)

You can combine them, something like:

> dupe: sizedupe: c: file:

Or even add a size to it:

> dupe: sizedupe: c: file: size:>2MB

Note that that finds file name AND (I believe its an AND) file size duplications – anywhere, not necessarily limited to C:, & also that name AND size are the only qualifications for “duplication”, as in files meeting that criteria may not be (byte-by-byte) “duplicates”.

A partial excuse is that these never made it to the changelog at [Wayback/Archive] www.voidtools.com/Changes.txt or [Wayback/Archive] www.voidtools.com/BetaChanges.txt.

It is in the documentation since May 2017 at [Wayback/Archive] Searching – voidtools though:

Read the rest of this entry »

Posted in Batch-Files, Development, Everything by VoidTools, Power User, Scripting, Software Development, Windows | Leave a Comment »

bash alias to decode email Quoted-Printable stdin data

Posted by jpluimers on 2025/09/25

Perl isn’t my strength, so I was glad to find the below links that inspired me to add this bash function to my profile decoding Quote-Printable email data (for instance used by sendmail and postfix to store SMTP message files):

# https://superuser.com/questions/1452249/fix-revert-wrong-encoding-of-file
function sendmail-decode-quoted-printable-from-stdin() {
  perl -0777 -ne 'use MIME::QuotedPrint; print decode_qp($_)'
}

Read the rest of this entry »

Posted in *nix, *nix-tools, bash, bash, Development, Perl, Power User, Python, Scripting, sendmail, Software Development | Leave a Comment »

mutool: all purpose tool for dealing with PDF files | mupdf Commands | Man Pages | ManKier

Posted by jpluimers on 2025/09/23

Sometimes I feel like having lived under a rock for ages despite trying to live the command-line life as much as possible.

Anyway: not that long ago I learned about [Wayback/Archive] mutool: all purpose tool for dealing with PDF files | mupdf Commands | Man Pages | ManKier

It is part of [Wayback/Archive] Package mupdf – man pages | ManKier which also has [Wayback/Archive] mupdf: MuPDF is a lightweight PDF viewer written in portable C | mupdf Commands | Man Pages | ManKier.

MuPDF – a kind of sibling to GhostScript – lives at [Wayback/Archive] MuPDF: The ultimate library for managing PDF documents.

The below query got me to [Wayback/Archive] mupdf/docs/man/mutool.1 at master · ccxvii/mupdf · GitHub in the “wrong” repository [Wayback/Archive] GitHub – ccxvii/mupdf: mirrored from git://git.ghostscript.com/mupdf.git

The actual repositories are at:

Read the rest of this entry »

Posted in *nix, *nix-tools, Console (command prompt window), Development, PDF, Power User, Scripting, Software Development | Leave a Comment »

Notes in case I want to create my own homebrew cask for installing software they disabled/removed

Posted by jpluimers on 2025/09/16

Some notes as it might enable me to install software that homebrew has deprecated or removed (note that local changes by default are ignored as the brew API takces precedence):

Despite the homebrew repository being a high commit-volume one which makes following it from a clone hard, just did already clone it Read the rest of this entry »

Posted in Apple, Development, DVCS - Distributed Version Control, GitHub, Home brew / homebrew, Mac OS X / OS X / MacOS, Power User, Ruby, Scripting, Software Development, Source Code Management, Versioning | Tagged: , | Leave a Comment »

Some notes on running Windows 11 on virtualised hardware and some on TPM

Posted by jpluimers on 2025/09/16

Not all virtualised hardware (older hardware usually has died by now) conforms to the Windows 11 minimum specifications.

So here are some links that should be of help to still get Windows 11 running on those:

If you insist on running older hardware that has a TPM header on the mainboard:

Read the rest of this entry »

Posted in CommandLine, Development, MSI, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 11, Z77A-G43 | Leave a Comment »

What Every Programmer Should Know about How CPUs Work • Matt Godbolt • GOTO 2024 – YouTube

Posted by jpluimers on 2025/09/10

[Wayback/Archive] What Every Programmer Should Know about How CPUs Work • Matt Godbolt • GOTO 2024 – YouTube

Main takeaways for me:

  • CPU pipelines have grown a lot longer than I was aware off
  • there are many more internal registers than I was anticipating
  • clever ways to convert if statements to non-jumps

--jeroen

Posted in .NET, Assembly Language, C, C#, C++, Delphi, Development, Python, Scripting, Software Development | Leave a Comment »

Some notes on getting CrystalDiskMark portable on Chocolatey

Posted by jpluimers on 2025/09/03

I needed the portable version of [Wayback/ArchiveCrystalDiskMark on Chocolatey (unlike the [Wayback/Archive] Chocolatey Software | CrystalDiskMark (Install) package). Luckily I found the auto-update package [Wayback/Archive] Chocolatey Software | CrystalDiskInfo (Portable) and knew both that CrystalDiskMark is from the same author as CrystalDiskInfo, and that their code is on GitHub like the Chocolatey package.

Given I had a the below chocolatey-packages/automatic/crystaldiskinfo.portable as a template, I asked the CrystalDiskInfo (Portable) package maintainer if they were willing to maintain CrystalDiskMark (portable) as well and was glad the response was “yes”: [Wayback/Archive] Portabe CrystalDiskMark similar to the current CrystalDiskInfo? · Issue #159 · mkevenaar/chocolatey-packages

So for my link-archive:

Read the rest of this entry »

Posted in .NET, Chocolatey, CommandLine, Development, Lightweight markup language, MarkDown, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows | Tagged: , | Leave a Comment »

RunElevated.bat: Run an Elevated command on Windows

Posted by jpluimers on 2025/09/02

For a long time, I have ran with the runelevated.bat in [Wayback/Archive] Run an Elevated command using that: “net file” returns errorlevel 1 when not UAC, and “PowerShell Start-Process” has a “-Verb RunAs“; see the answers at http://stackoverflow.com/questions/7044985/how-can-i-auto-elevate-my-batch-file-so-that-it-requests-from-uac-admin-rights for more information

By now, I would just prepend this oneliner into each batch-file needing elevation:

@pushd "%~dp0" & fltmc | find "." && (powershell start '"%~f0"' ' %*' -verb runas 2>nul && popd && exit /b)

Both the initial batch file and one-liner are from [Wayback/Archive] windows – How can I auto-elevate my batch file, so that it requests from UAC administrator rights if required? – Stack Overflow (thanks [Wayback/Archive] Ir Relevant,  [Wayback/Archive] ceztko, [Wayback/Archive] Jamesfo, and [Wayback/Archive] PDixon724)

Note that the net file trick below should actually be repeated twice. This is explained in [Wayback/Archive] windows – Batch script: how to check for admin rights – Stack Overflow (thanks [Wayback/Archive] zumalifeguard), but wait: there is even a better solution!

The fltmc trick above works much better than the net file trick and is available from Windows XP and up, see [Wayback/Archive] windows – Batch script: how to check for admin rights – Stack Overflow (thanks [Wayback/Archive] npocmaka).

Oh: on systems where I have full installation control, I always install gsudo, see gsudo (sudo for windows).

–jeroen

Read the rest of this entry »

Posted in .NET, Batch-Files, CommandLine, Development, PowerShell, PowerShell, Scripting, Software Development | Leave a Comment »

Jeroen Wiert Pluimers @wiert@mastodon.social on X: “@_ObomheseR Since JavaScript is in the group of curly based programming languages influenced by the B programming language, integer constants starting with zero are tried first in octal base. 017 octal is 15 decimal 018 octal is not possible, so becomes 18.”

Posted by jpluimers on 2025/08/20

With the constant influx of JavaScript programmers, it keeps worth repeating that you should always run JavaScript in strict mode via "use strict"; (like in the past Visual Basic 6 developers should use option strict and option explicit) to forget risky JavaScript syntax like implicit ocal constants (which were removed from the documentation in the 2009 ECMAScript 5 specification for JavaScript), and every codeline should have a test code covering it, especially for comparisons involving non-strict behaviour like the use of leading zeros.

As of the succeeding 2015 standard (ECMAScript 6), octal numbers in JavaScript start with 0o or 0O followed by a series of octal digits.

Oh, and the history of octal in computing of course has to do with 6-bit systems and also lead to 6-six bit character codes including BCD character encoding..

My tweet back earlier this year: [WaybackSave/Archive] Jeroen Wiert Pluimers @wiert@mastodon.social on X: “@_ObomheseR Since JavaScript is in the group of curly based programming languages influenced by the B programming language, integer constants starting with zero are tried first in octal base. 017 octal is 15 decimal 018 octal is not possible, so becomes 18.”

Inhteritence:

Read the rest of this entry »

Posted in B, BASIC, C, Development, JavaScript/ECMAScript, MarkDown, Retrocomputing, Scripting, Software Development, VB6, Visual BASIC | Leave a Comment »

Quick batch file hack to download a file calling PowerShell to do the heavy lifting

Posted by jpluimers on 2025/08/12

I needed this download-file.bat a while ago, but forgot how I found out.

It’s in this gist too: [Wayback/Archive] Quick batch file hack to download a file calling PowerShell to do the heavy lifting.

Here we go: Read the rest of this entry »

Posted in .NET, Batch-Files, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 10, Windows 11, Windows 8.1 | Leave a Comment »