Archive for the ‘Scripting’ Category
Posted by jpluimers on 2025/10/14
I forgot how I bumped into this, but a while ago I found this interesting 2023 post: [Wayback/Archive] It’s Time For A Change: datetime.utcnow() Is Now Deprecated – miguelgrinberg.com explaining naive (without time zone) and aware (with time zone) date time objects.
It reminded me of Delphi, where NowUTC – as Delphi does have neither naive or aware date time objects – returns a floating point value (yes, it has a separate TDateTime type, but it represents the number of days that have passed since December 30, 1899 which in face stems from the Windows OLE Automation era* (OLE Automation is a subset of COM), see [Wayback/Archive] DateTime.ToOADate Method (System) | Microsoft Learn.
That method is mentioned in [Wayback/Archive] Why You Should Use NowUTC Instead of Now in Delphi: A Quick Guide – YouTube and Delphi deserves a way better infrastructure of date and time handling.
So this post is also a reminder to myself: figure out if there is an object oriented DateTime library for Delphi yet, and if not see if there is interest to create one similar to [Wayback/Archive] Noda Time | Date and time API for .NET by Jon Skeet.
Delphi references
Read the rest of this entry »
Posted in .NET, .NET Framework, .NET Standard, C#, Conference Topics, Conferences, Delphi, Development, Event, Jon Skeet, Python, Scripting, Software Development | Leave a Comment »
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 »
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 »
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: 15073, 4640 | Leave a Comment »
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 »
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 »
Posted by jpluimers on 2025/09/03
I needed the portable version of [Wayback/Archive] CrystalDiskMark 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: 159, 16 | Leave a Comment »
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 »