Long live the Clippy bot!
[Waybacksave/Archive] Elle Cordova on X: “Alexa, Siri and the other bots hanging out in the server break room again”
Posted by jpluimers on 2023/09/23
Long live the Clippy bot!
[Waybacksave/Archive] Elle Cordova on X: “Alexa, Siri and the other bots hanging out in the server break room again”
Posted in AI and ML; Artificial Intelligence & Machine Learning, Bookmarklet, ChatGPT, Development, GPT-3, GPT-4, JavaScript/ECMAScript, Office, Power User, Scripting, Software Development, Web Browsers | Leave a Comment »
Posted by jpluimers on 2023/09/20
As I promised a few months back in Bookmarklets for Archive.is and the WayBack Machine to go to the original page, moar JavaScript fiddling, this time with XPath based bookmarklets to navigate from Archive.is pages to Saved From, Redirected from, Via and Original pages.
An alternative would be using XPath as the additional fields are always structured in a table like the html below (taking complex pages like https://archive.ph/5iVVH and https://archive.ph/2015.11.14-044109/http://www.example.org/ as an example).
I got triggered to using XPath from this answer from [Wayback/Archive] gdyrrahitis at [Wayback/Archive] Javascript .querySelector find by innerTEXT – Stack Overflow (thanks [Wayback/Archive] passwd for asking):
Posted in Agile, Bookmarklet, Code Quality, Code Review, Development, HTML, JavaScript/ECMAScript, Power User, Scripting, Software Development, Web Browsers, Web Development, XML/XSD, XPath | Leave a Comment »
Posted by jpluimers on 2023/09/14
For my link archive so I can better automate archiving Tweet threads using bookmarklets written in JavaScript:
The base will likely be this:
javascript:void(open(`https://archive.is/?run=1&url=${encodeURIComponent(document.location)}`))
which for now I have modified into this:
javascript:void(open(`https://threadreaderapp.com/search?q=${document.location}`))
It works perfectly fine without URL encoding and demonstrates the JavaScript backtick feature for template literals for which you can find documentation at [WayBack/Archive] Template literals – JavaScript | MDN.
Posted in *nix, *nix-tools, bash, bash, Bookmarklet, Communications Development, cURL, Development, HTTP, https, Internet protocol suite, Power User, Scripting, Security, Software Development, TCP, Web Browsers | Leave a Comment »
Posted by jpluimers on 2023/09/12
I have converted the below PowerShell one-liner into this batch file (the ^| syntax is to ensure the pipe runs within PowerShell, not within the batch file):
PowerShell 'Get-CimInstance -Namespace "Root\cimv2\mdm\dmmap" -ClassName "MDM_EnterpriseModernAppManagement_AppManagement01" ^| Invoke-CimMethod -MethodName UpdateScanMethod'
Since I am a CLI person, and some Windows applications are only available on the Microsoft Store, I wanted to be able to initiate an update cycle from the command-line interface.
So I searched for [Wayback/Archive] microsoft store update all apps from the command-line – Google Search and found these to be valuable:
Posted in Batch-Files, Development, Microsoft Store, Power User, PowerShell, Scripting, Software Development, Windows, Windows 10, Windows 11 | Leave a Comment »
Posted by jpluimers on 2023/09/11
Only having really learned to speak English starting in my late teens, I never got the “smarter than the average bear” reference, so I filed what I thought was a bug early 2019: [Wayback/Archive] “You must be smarter than the average bear…” after upgrading to 7zip.install v18.6 and notepadplusplus.install v7.6.2 · Issue #1700 · chocolatey/choco which last year got this useful comment
I had this for several packages now, since I am updating them daily.
I am assuming there is a way to remove versions, which leads to this error until there is a new update.
It was confirmed this summer from
I’m smarter than the average bear at least once or twice a month. I think it might be packages which are pulled back and you happen to have installed that version
The bug got referenced this summer from [Wayback/Archive] Remove warning message about “smarter than the average bear” · Issue #3186 · chocolatey/choco.
This in turn lead to [Wayback/Archive] (#3186) Remove easter egg “You are smarter than the average bear …” by pauby · Pull Request #3276 · chocolatey/choco
That made me realise that for large groups of English speaking people “smarter than the average bear” would actually be a well known thing.
So I searched and learned a thing or two:
Posted in .NET, Chocolatey, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows | Leave a Comment »
Posted by jpluimers on 2023/08/30
Stumbled across something that goes well with jq (the sed for JSON of which I wrote about before), [Wayback/Archive] Jan-Piet Mens :: A shell command to create JSON: jo:
Posted in Development, JavaScript/ECMAScript, jo, jq, JSON, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2023/08/29
Often the power is in the combinations of tools.
Read until the epilogue…
In this case, I needed to be able to query the JSON results of calls to REST services from the command-line so I could process them in Batch files.
Since I could not find anything readily available, I originally Originally I opted for the PowerShell command-line scripting tool, as that ships with recent Windows versions and can re-use anything that .NET brings. But though [Wayback/Archive] .NET has built in JSON serialization support, there is [Wayback/Archive] no querying support in it.
Then I thought about Delphi, as it [Wayback/Archive] too has a built-in JSON parser, but even the well known [Wayback/Archive] JSON SuperObject library has no query support.
Back to .NET, which – like Delphi – has a well known and respected third party JSON library as well: [Wayback/Archive] NewtonSoft JSON aka JSON.net and that one [Wayback/Archive] does have support for querying JSON with the SelectToken function.
That’s the fundament of the rest of this article, with the potential to be used in a cross-platform as well.
So no need for a plan B.
Posted in *nix, *nix-tools, .NET, Batch-Files, Conference Topics, Conferences, Development, Event, JavaScript/ECMAScript, jq, JSON, Power User, Scripting, Software Development, Windows, Windows Development | Leave a Comment »
Posted by jpluimers on 2023/08/24
For my link archive: [Wayback/Archive] Bruce Tate on Twitter: “What’s the most unique feature of your favorite programming language?” / Twitter
From the languages that I have been using most:
Of course they can; most of Linq is built around interface extension methods.Interfaces were actually one of the driving forces for the development of extension methods; since they can’t implement any of their own functionality, extension methods are the easiest way of associating actual code with interface definitions.See the Enumerable class for a whole collection of extension methods built aroundIEnumerable<T>. To implement one, it’s the same as implementing one for a class
It was a kind of follow-up on his earlier tweet that also sparked nice responses at [Archive] Bruce Tate on Twitter: “What is a #programming technique or construct that other people like but you think is overused?” / Twitter.
In my respons I phrased my decades long pet peeve [Archive] Jeroen Wiert Pluimers on Twitter: “@redrapids OOP: inheritance over composition. This leads to deep hierarchies that eventually nobody understands.” / Twitter.
Whereas with OOP (object-oriented programming) one should use composition over inheritance, often the reverse is true.
Actually my take can be generalised into two directions as these hierarchies:
JavaScript for instance takes the crowded global namespace one step further by many libraries taking $q, $_ or $x, which is part of my take
[Wayback/Archive] Jeroen Wiert Pluimers on Twitter: “@redrapids Mutation of global state followed by an overly crowded global namespace. Example on the JavaScript side: too many libraries and projects using the global `$` and `_` symbols.”.
[Wayback/Archive] joao on Twitter: “@redrapids But to be more specific, I think sometimes there’s too much indirection with very deep class hierarchies. In the same vein those rules of “functions should have at most 6 arguments and 5/10/20 lines” can lead to a ton of indirection chasing the subfunctions being called”.
–jeroen
Posted in .NET, C#, Conference Topics, Conferences, Delphi, Development, Event, JavaScript/ECMAScript, Pascal, Scripting, Software Development | Leave a Comment »