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 ‘Software Development’ Category

Bookmarklet-Youtube: Add all subscriptions to watch-later

Posted by jpluimers on 2023/05/16

Saved because I want to learn how to save a YouTube URL into a [Wayback/Archive] YouTube: Watch later play list, as doing it by hand takes at least 10 seconds per URL.

[Wayback/Archive] Bookmarklet-Youtube: Add all subscriptions to watch-later

–jeroen

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

Disabling the Windows 10 news (and weather) feeds

Posted by jpluimers on 2023/05/11

I finally got annoyed enough to figure out how to disable the Windows 10 news (and weather) feeds.

At first I thought the solution in this post worked for Windows 11 as well, but re-testing in Windows 11 it does not or does not (or not any more: given so many new Windows 11 releases with ever changing functionality I’m not surprised).

Disable Windows news feeds for current user

Failure: just disabling the news feed will automatically get it reset by explorer.exe

Based on the below sources, I made this small batch file:

Read the rest of this entry »

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

Restart Windows explorer with an UAC administrator token

Posted by jpluimers on 2023/05/10

Sometimes, you want to restart the Windows explorer. This is already an exception case which you want to do when explorer hangs (for instance when taskbar icons do not respond any more), or has files locked which need to be modified. I described the latter in Inno Setup: Program Folder not showing up In Start > All Programs , with this very simple restart script:

taskkill /F /IM explorer.exe
start explorer

Even more exception is wanting to run explorer with a UAC elevated administrative token. I sometimes do this when moving around stuff from other users on the same computer without having them logged on (as that would lock the files or directories to be moved around).

The risk of running explorer under UAC elevation, is that any program you start will also start UAC elevated, so beware what you ask for…

This is how you start explorer under UAC elevation:

pwsh.exe -nol -noni -nop -w hidden -c "taskkill /f /im explorer.exe; start explorer -v runas -a /nouaccheck"

or if you run an older Windows version of PowerShell:

PowerShell.exe -nol -noni -nop -w hidden -c "taskkill /f /im explorer.exe; start explorer -v runas -a /nouaccheck"

These command-line options and verbs are used:

Time to explain a few:

Read the rest of this entry »

Posted in Batch-Files, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 10, Windows 11, Windows 7, Windows 8.1 | 1 Comment »

I dug into scoop a tiny bit: some thoughts and links

Posted by jpluimers on 2023/05/09

Last month, I wrote Need to take a look a Scoop (as a long time Chocolatey user).

So I did, and started with a list of my Chocolatey installs grouped by functionality in order to expand the table towards winget and [Wayback/ArchiveGitHub – ScoopInstaller/Scoop: A command-line installer for Windows.

This was a good way to start learning, and by already doing this, got learned this:

  • Whereas Chocolaty has a global searchable community package index at [Wayback/Archive] Chocolatey Software | Packages  which is moderated too.
  • Scoops works differently. There are many buckets you can get your applications from, and there is no Scoop maintained index of them.

Let’s focus on the latter for a bit:

From the above, I got a feeling that Scoop is way more like the Linux Package Managers than WinGet and Chocolatey are.

–jeroen

Read the rest of this entry »

Posted in Chocolatey, Development, Power User, Scoop, Software Development, Windows, Windows Development, winget | Leave a Comment »

Some more links on bookmarklets: this time ones that operate on (selection of text on) the current page

Posted by jpluimers on 2023/05/04

As a continuation of the various bookmarklet posts, here is one with information on bookmarklets that operate on the current page, for instance when you already got text selected.

All via [Wayback/Archive] bookmarklet that works on link of current selection – Google Search

–jeroen

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

How long will the free GPT-3.5 and GPT-4 based ChatGPT exist?

Posted by jpluimers on 2023/05/03

For a while now, there has been a free [Wayback/Archive] ChatGPT which works around the paid barriers by relaying the chat through 3rd parties.

I wonder how long it will exist.

The cease and desist letter was from OpenAI to the repository owner which – paraphrased – maintains the stance that the 3rd parties pay license fees to OpenAI, and that if these parties have issues with his tool basically scraping them, should contact the repository owner to work things out.

This is all part of a bigger discussion on license and copyright of what AI based LLMs (Large Language Models) which are sourced from a large corpus of text that we all publish for free on the internet without a way to track back from ChatGPT responses to which texts were used.

Links:

Read the rest of this entry »

Posted in AI and ML; Artificial Intelligence & Machine Learning, ChatGPT, Development, GPT-3, Software Development | Leave a Comment »

The Wordle word list is in the source JavaScript file (via Isotopp)

Posted by jpluimers on 2023/05/03

Oh well: [Archive] Kris on Twitter: “L> add AI there and you’ve got a paper R> I just had a look, and that thing is pretty much completely offline. the JS contains the entire dictionary C> well would you look at that, might want to use the actual dictionary then “

Actually, it was dead easy to copy the sources to a gist and host the gist:

And of course someone distilled the wordle word solutions list into some statistics:

More was done at [Wayback/Archive] Reverse Engineering Wordle | Robert Reichel.

Which got updated to the statistics of the union of solution and accepted words list

Another tool that helps solving is [Wayback/Archive] willthames/wordle-guesses which I found via [Archive] Will Thames on Twitter: “I spent some of my New Year’s Day writing a program to generate the best first two guesses for Wordle. Time well spent, I think: …”.

Jilles then posted a video on how to view the source [Archive] Jilles🏳️‍🌈 on Twitter: “How to cheat on #wordle …”.

To make Wordle even harder, there is Absurdle, an adversorial version of Wordle that decides the word upon your input until it runs out of decisions:

A Dutch and German version were added as Woordle and Wordle (which missed being called WorDeL and Wortle):

Shortly followed by another German version (always the Austrians setting themselves apart), and a French one (which messed Le Word as perfect name):

There is also a four-letter word edition, actually two of them:

There is a Prime version too:

Felienne posted a cool analysis bot that watches Wordle tweets and uses them to estimate the correct Wordle solution:

Oh, there is a single Letterle, which on average takes you some 13 tries when disregarding letter frequencies (which likely should not matter):

When you think Absurdle was going far, look at what happened Wordlinator:

Two search tools that are very useful:

If you are desperate, these solvers can help; the second one is more flexible, the first one faster, and the last one is pure cheating:

  1. [Wayback/Archive] Ruining the fun: a Wordle auto-solver – by Tom
  2. [Wayback/Archive] Wordle Helper – Suggestion and Solver Tool – Gamer Journalist
  3. [Wayback/Archive] Wordle Answers (February 2022) – Today’s Solution

I tried referencing all posts in the somewhat broken thread at:

Some links that did not make it into that thread (yet):

Having good start words and an on-line dictionary help:

And there is always a really fast way: [Wayback/Archive] Wordle Solver | Not Fun at Parties (explained in [Wayback/Archive] Ruining the fun: a Wordle auto-solver – by Tom)

–jeroen

Read the rest of this entry »

Posted in Development, JavaScript/ECMAScript, LifeHacker, Natural Languages, Power User, Scripting, Software Development | Leave a Comment »

I want to check out how to do POST requests using bookmarklets in order to save URLs to the WayBack machine

Posted by jpluimers on 2023/04/27

I want to check out how to do POST requests using bookmarklets in order to save URLs to the Wayback machine.

The reason is that every few months or so, saving a page the normal way through a something like https://web.archive.org/save/URL fails for one reason or the other, but going to https://web.archive.org/save, then entering URL, and pressing “SAVE PAGE” button works fine:

The the failing way above is using a GET request, the succeeding workaround will open https://web.archive.org/save/URL  using the below POST request (where I omitted some HTTP cookies and HTTP header fields for brevity).

  • POST request using PowerShell:
    $session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
    $session.UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36"
    Invoke-WebRequest -UseBasicParsing -Uri "https://web.archive.org/save/URL" `
    -Method "POST" `
    -WebSession $session `
    -Headers @{
    "method"="POST"
      "origin"="https://web.archive.org"
      "referer"="https://web.archive.org/save"
    } `
    -ContentType "application/x-www-form-urlencoded" `
    -Body "url=URL&capture_outlinks=on&capture_all=on&capture_screenshot=on"
  • POST request using cURL on bash:
    curl 'https://web.archive.org/save/URL' \
      -H 'origin: https://web.archive.org' \
      -H 'content-type: application/x-www-form-urlencoded' \
      -H 'referer: https://web.archive.org/save' \
      --data-raw 'url=URL&capture_outlinks=on&capture_all=on&capture_screenshot=on' \
      --compressed
  • POST request using the fetch API in JavaScript:
    fetch("https://web.archive.org/save/URL", {
      "headers": {
        "content-type": "application/x-www-form-urlencoded",
      },
      "referrer": "https://web.archive.org/save",
      "body": "url=URL&capture_outlinks=on&capture_all=on&capture_screenshot=on",
      "method": "POST",
      "mode": "cors"
    });

BTW: Yes, I know that URL is not a valid URL, so it will return a page with “http://url/ URL syntax is not valid.“.

All links below via [Wayback/Archive] bookmarklet post request – Google Search:

I tried to put createFormSubmittingBookmarklets/createFormSubmitBookmarklets.js in a bookmarklet using both userjs.up.seesaa.net/js/bookmarklet.html and skalman.github.io/UglifyJS-online. That failed: somehow this code does not want to run as bookmarklet.

Running it from the console is fine though, and gave me this basic bookmarklet template:

javascript:function sf(ur,ty,fd){function me(tg,pr){var el=document.createElement(tg);for(const[nm,vl]of Object.entries(pr)){el.setAttribute(nm,vl);}return el}const fm=me("form",{action:ur,method:ty,style:"display:hidden;"});for(const[nm,vl]of Object.entries(fd)){fm.appendChild(me("input",{name:nm, value:vl}))}document.body.appendChild(fm);fm.submit()}sf("https://web.archive.org/save","post",{"url":"URL","capture_outlinks":"on","capture_all":"on","capture_screenshot":"on","wm-save-mywebarchive":"on","email_result":"on","":"SAVE PAGE"});

There bold URL there is the URL to be saved. I need to test this, then rework it to become parameterised.

–jeroen

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

Kevin Lewis (he/him) on Twitter: “Wow thanks for all the support folks! I’ve been working on this project today: larger font, options for single/group captioning powered by @DeepgramAI, and a static badge mode as suggested by @bitandbang https://t.co/FBELwDsD4V” / Twitter

Posted by jpluimers on 2023/04/25

Wow, just wow: [Archive] Kevin Lewis (he/him) on Twitter: “Wow thanks for all the support folks! I’ve been working on this project today: larger font, options for single/group captioning powered by @DeepgramAI, and a static badge mode as suggested by @bitandbang https://t.co/FBELwDsD4V” / Twitter

Via [Archive] Jilles🏳️‍🌈 on Twitter: “Love it and worried about it at the same time.” / Twitter

–jeroen

Posted in Development, Hardware Development, Hardware Interfacing, Software Development | Leave a Comment »

The CPU load average metric often is not a good one to alert on

Posted by jpluimers on 2023/04/20

Boy I wish threads with more than one person could be saved by the ThreadReaderApp.

Anyway:

[WayBack] Thread by @mipsytipsy: oh boy.. i was just idly musing over how the single most ubiquitous/useless metric is “CPU load average”, lol i wonder if you could use CPU…

oh boy.. i was just idly musing over how the single most ubiquitous/useless metric is “CPU load average”, lol

i wonder if you could use CPU load alerts to score how modern and powerful a team’s toolchain is, like a Waffle House Index for tooling. 🤔

 

…oh oh! but i was gonna say, this thread between @drk and @shelbyspees is a killer nanotutorial in how to ask better questions about your code — where to start, how to drill down and dig in, how to instrument, and how to approach such an open-ended exploratory jaunt. 👏🐝❤️

it’s a really good illustration of this thing we end up saying all the time, which is “don’t fear the future, it is simpler and clearer and *easier* here! the way you are doing it NOW is the hard way!” 😖

time for cpu load average to go the way of the PC LOAD LETTER …

0:00
/ 0:01

 

 

Read the rest of this entry »

Posted in *nix, Cloud, Development, DevOps, Infrastructure, Power User, Software Development, Systems Architecture | Leave a Comment »