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

Upgrading drawio throug brew functions slightly different than one expects

Posted by jpluimers on 2021/12/31

TL;DR

This fails:

brew update drawio
brew upgrade drawio

This works:

brew cask upgrade drawio

Read the rest of this entry »

Posted in Apple, Cloud Apps, draw.io, Home brew / homebrew, Internet, Power User | Leave a Comment »

Tarieven 2022 | Consument | Liander

Posted by jpluimers on 2021/12/31

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

Winbox configuration files

Posted by jpluimers on 2021/12/31

A few notes:

  • WinBox configuration files are under %APPDATA%\Mikrotik\Winbox
    • The subdirectory sessions contains binary *.viw files that seem to represent “view” configurations (the positions, dimensions and other properties of the open Windows in a Winbox session) where the * of the name seems to be an IPv4 address of a machine.
    • Directories named like 6.40.3-2932358209 and 6.43.13-695307561 contain configuration files that seem to determine what WinBox features a certain RouterOS version should reveal; files in those directories seem to always be these:
      • advtool.crc / advtool.jg
      • dhcp.crc / dhcp.jg
      • hotspot.crc / hotspot.jg
      • icons.crc / icons.png
      • mpls.crc / mpls.jg
      • ppp.crc / ppp.jg
      • roteros.crc / roteros.jg
      • roting4.crc / roting4.jg
      • secure.crc / secure.jg
      • wlan6.crc / wlan6.jg
    • There are binary files Addresses.cdb and settings.cfg.viw
    • A text file named sessionpath contains the expanded path %APPDATA%\Mikrotik\Winbox\sessions

The *.crc files contain a CRC code, presumably on the contents of the correspoding *.jg file. The *.jg files seem to contain some kind of JSON.

Some links I found:

Read the rest of this entry »

Posted in Development, Hardware, Internet, MikroTik, Network-and-equipment, Power User, RouterOS, routers, Scripting, Software Development, WinBox | Leave a Comment »

Leerlingen zelf een toets laten maken die ze zelf kunnen nakijken (door Martijn Leisink)

Posted by jpluimers on 2021/12/30

[Archive.is] Martijn Leisink on Twitter: “Soms wil je leerlingen een zelftoets laten maken. Je wil dat ze die zelf na kunnen kijken, maar tegelijkertijd wil je juist niet dat ze meteen de antwoorden op kunnen zoeken. Dat lijkt tegenstrijdig, maar er is een manier! (Ter inspiratie voor andere bèta-docenten.)… “

Thread: [Wayback] Thread by @mleisink on Thread Reader App – Thread Reader App

Truc: [Archive.is] Harry de Jonge on Twitter: “In eerste instantie 8 van de 9 goed. Uit de formule volgt dat ‘t te behalen totaal aantal punten n x 360 – 90 moet zijn, met behulp daarvan bepaald dat ik vraag 8 fout had. Ergens 2 of 4 van aftrekken is nog lastig😀 Natuurkunde is toegepaste wiskunde.… “

Zelf maken: [Archive.is] http://zelftoets.wiskunstelaar.nl/

Maak een aantal vragen met telkens drie antwoordopties.
Zet de getallen in de tabel hierboven voor de antwoorden.
Een leerling kan met het volgende recept controleren hoeveel antwoorden hij goed heeft:

  1. Tel de getallen voor het antwoord van jouw keus bij elkaar op.
  2. Vermenigvuldig het resultaat met 10.
  3. Druk op de knop sinus en vervolgens op de inverse cosinus.
  4. Deel de uitkomst door 20 en je weet hoeveel vragen je goed hebt beantwoord.

Leerlingen kunnen dus wel achterhalen hoeveel antwoorden ze goed hebben, maar niet welke antwoorden goed zijn.
Let er overigens op dat de rekenmachine op graden moet staan en niet op radialen!

–jeroen

Posted in Learning/Teaching, LifeHacker, Power User | Leave a Comment »

Productivity tips by Florian Haas and David Moreau-Simard: the mottos you work by

Posted by jpluimers on 2021/12/30

My own motto: learn new things every day.

Florian:

[Archive.is] Florian Haas 🇪🇺 on Twitter: “Docs or it didn’t happen.… “

David:

[Archive.is] ☁David Moreau-Simard on Twitter: “Hey software and system folks, I’m curious: what are some of the mottos you work by ? I’ll start:

Via Florian’s pinned Twitter post I found while writing media.ccc.de – No, we won’t have a video call for that! (Communications in distributed teams by Florian Haas).

–jeroen

Posted in Development, DevOps, Software Development | 1 Comment »

windows 7 – How can I eject a CD via the cmd? – Super User

Posted by jpluimers on 2021/12/30

Quite a while ago I found [Wayback] windows 7 – How can I eject a CD via the cmd? – Super User, but forgot to document that in the batch-files I created from it.

It shows both this one-liner:

powershell "(new-object -COM Shell.Application).NameSpace(17).ParseName('D:').InvokeVerb('Eject')"

The hardcoded const 17 is for the ssfDRIVES element in the ShellSpecialFolderConstants, which is documented at [Wayback] ShellSpecialFolderConstants (shldisp.h) – Win32 apps | Microsoft Docs.

There is no PowerShell equivalent of that element, hence the hardcoded value 17.

The script invokes the verb Eject, which works on any kind of removable media (not just optical drives). If you want to limit it to only certain drive types, then you would need to compare the Type of the ParseName() result. However, that result has a Type property returns a string for which the possible values are not documented.

Here are some links I tried to find out what is returned:

In addition to the Shell.Application, there also is Scripting.FileSystemObject, which allows enumerating the drives and filter on DriveType. This is the relevant documentation:

The second example in the above mentioned answer shows how to use this to filter for optical drives.

It also shows a cool technique to have a hybrid batch-file/JScript script:

@if (@CodeSection == @Batch) @then

@echo off
setlocal

cscript /nologo /e:JScript "%~f0"

goto :EOF

@end // end batch / begin JScript hybrid chimera

// DriveType=4 means CD drive for a WScript FSO object.
// See http://msdn.microsoft.com/en-us/library/ys4ctaz0%28v=vs.84%29.aspx

// NameSpace(17) = ssfDRIVES, or My Computer.
// See http://msdn.microsoft.com/en-us/library/windows/desktop/bb774096%28v=vs.85%29.aspx

var oSH = new ActiveXObject('Shell.Application'),
    FSO = new ActiveXObject('Scripting.FileSystemObject'),
    CDdriveType = 4,
    ssfDRIVES = 17,
    drives = new Enumerator(FSO.Drives);

while (!drives.atEnd()) {
    var x = drives.item();
    if (x.DriveType == CDdriveType) {
        oSH.NameSpace(ssfDRIVES).ParseName(x.DriveLetter + ':').InvokeVerb('Eject');
        while (x.IsReady)
            WSH.Sleep(50);
    }
    drives.moveNext();
}

–jeroen

Posted in Batch-Files, Development, JScript, PowerShell, Scripting, Software Development | Leave a Comment »

Some notes on ESXi `smartinfo` throwing `error Cannot open device`

Posted by jpluimers on 2021/12/29

I wrote about the built-in smartinfo command before at NVMe and SATA health data on ESXi: some links to investigate.

It is at /usr/lib/vmware/vm-support/bin/smartinfo, which is not in the path. I used it recently after having trouble with some 2.5-inch SSD devices, of one which is listed below.

Some note on this error what smartinfo from ESXi throwed on some devices over time on various ESXi machines:

Failed to get SMART stats for t10.ATA_____Samsung_SSD_860_EVO_500GB_______________S3Z2NB0M529545P_____ error Cannot open device 
----------------------------------------------------- 

The same SSD sometimes had very big latency times:

2021-05-01T16:23:20.306Z cpu7:2097783)WARNING: ScsiDeviceIO: 1564: Device t10.ATA_____Samsung_SSD_860_EVO_500GB_______________S3Z2NB0M529545P_____ performance has deteriorated. I/O latency increased from average value of 59147
2021-05-01T16:23:20.306Z cpu7:2097783)WARNING: microseconds to 1274466 microseconds.
2021-05-01T16:23:20.306Z cpu7:2097783)WARNING: ScsiDeviceIO: 1564: Device t10.ATA_____Samsung_SSD_860_EVO_500GB_______________S3Z2NB0M529545P_____ performance has deteriorated. I/O latency increased from average value of 59150
2021-05-01T16:23:20.306Z cpu7:2097783)WARNING: microseconds to 2664445 microseconds.
2021-05-01T16:23:20.847Z cpu7:2097190)ScsiDeviceIO: 1530: Device t10.ATA_____Samsung_SSD_860_EVO_500GB_______________S3Z2NB0M529545P_____ performance has improved. I/O latency reduced from 2664445 microseconds to 526814 microseconds.
2021-05-01T16:23:38.477Z cpu5:2097783)ScsiDeviceIO: 1530: Device t10.ATA_____Samsung_SSD_860_EVO_500GB_______________S3Z2NB0M529545P_____ performance has improved. I/O latency reduced from 526814 microseconds to 116553 microseconds.
2021-05-01T16:24:01.380Z cpu9:2097674)NMP: nmp_ResetDeviceLogThrottling:3586: last error status from device t10.ATA_____Samsung_SSD_860_EVO_500GB_______________S3Z2NB0M529545P_____ repeated 1 times

[Wayback] “smartinfo” “error Cannot open device” – Google Search delivered mainly results around the old smartinfo.sh tool that is now replaced by the smartinfo binary:

[Wayback] “ESXi” “smart” “error Cannot open device” – Google Search returned no relevant results.

I think an 860 EVO 2.5-inch SSD is not on par running half a dozen Windows VM’s that have regular write actions, but I will later give this a try, though I doubt it will help as this is on a VMware 6.7 update 3 based system which should not have the vmw_ahci driver slowness:

[Wayback] NVMe SSD Fast, but SATA SSD slow ! – VMware Technology Network VMTN (hyphen fixes mine):

I have done the esxcli system module set --enabled=false --module=vmw_ahci and rebooted, and I got a small performance increase.  But still not what I thought.

It refers these other posts:

The system with this behaviour is on these versions:

# esxcli software vib list | grep ahci
sata-ahci                      3.0-26vmw.670.0.0.8169922             VMW     VMwareCertified   2021-04-03
vmw-ahci                       2.0.7-2vmw.670.3.143.17700523         VMW     VMwareCertified   2021-04-04

–jeroen

Posted in ESXi6, ESXi6.5, ESXi6.7, ESXi7, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »

media.ccc.de – No, we won’t have a video call for that! (Communications in distributed teams by Florian Haas)

Posted by jpluimers on 2021/12/29

Not just for during the Covid times: the helpful examples and thorough explanation by Florian makes this a must-watch video for anyone wanting to participate in distributed teams.

[Wayback] media.ccc.de – No, we won’t have a video call for that!

The above link has downloads for both Video (mp4 and WebM formats) and audio (mp3 and opus formats). I found the video easier to digest.

If you want to watch it on-line, there is the YouTube video (below the signature) which has closed captions as well.

Kristian Köhntopp made a [Wayback/Archive.is] short intro and abstract on Twitter:

https://xahteiwi.eu/resources/presentations/no-we-wont-have-a-video-call-for-that/

Exactly one year ago, the office building I was working from every work day caught fire, and was closed for a month for renovation.

On the day of the planned reopening, my employer declared Covid emergency and asked everybody to work from home.

So that is how we work since then, and we will continue to do so until at least October.

Not too much has changed, though. When the new https://oosterdokseiland.nl/en/ opens, there will be probably a lot of pain between the people who go to the office to work and those who don’t.

The talk above by @xahteiwi explains in a nice way how to work properly remote first:

  • Writing over speaking.
  • Asynchronous over synchronous.
  • Structured communication over free form.

Some things require a free form video chat, but even then, set an agenda and write minutes.

Florian also explains when to use what, and what situations would require a synchronous wide-band channel, but most of them are exceptional, and most of the time you could execute better using structured, written, async mode comms.

Having said that, if you want his talk as a briefing, here is a Youtube: https://www.youtube.com/watch?v=NVnci3tyDa4

First watch the video, then read the full speaker notes at [Wayback] No, We Won’t Have a Video Call for That! – xahteiwi.eu “My talk from FrOSCon 2020, Cloud Edition.”

More on-line:

–jeroen

Read the rest of this entry »

Posted in Agile, Conference Topics, Conferences, Development, Event, LifeHacker, Power User, Software Development | 1 Comment »

Chrome: allow some URLs to “never sleep” (or hibernate/discard)

Posted by jpluimers on 2021/12/29

This option in Chrome has moved around a bit, so here is how it was in Version 89.0.4389.90 (Official Build) (64-bit) when I documented it.

  1. Browse to chrome://discards/
  2. Don’t be intimidated by the many rows and columns; only the rightmost 8 (at the time of writing) are interesting:

  3. Search for the URL (in my chase https://web.whatsapp.com/ , so I searched for whatsapp which you see as orange in the screenshots below) for which you want to ensure it will never sleep/hibernate (Chrome calls this “discardable”)

  4. Click Toggle under the checkmark ✔ so it changes into a cross ✘️ (so the URL will never be discarded, hence always stays awake)

Do this only for tabs that are not CPU/memory/traffic intensive

I got there via these posts:

When searching for discards, I found this post: [Wayback] How to Prevent Chrome from Reloading Tabs When You Switch to Them

Chrome has built-in memory management that causes inactive tabs to “sleep” as RAM is filled. When you click the tab again, it has to reload the page. It’s annoying.

–jeroen

Posted in Chrome, Development, Google, Power User, SocialMedia, Software Development, Web Development, WhatsApp | Leave a Comment »

Covid-19 booster prik vanuit het buitenland reserveren: bel +31851124970

Posted by jpluimers on 2021/12/28

Via https://twitter.com/locuta/status/1475849029376516098

LET OP: We hebben een telefoonnummer gevonden dat je vanuit het buitenland kunt bellen om een boosterafspraak te maken: +31851124970. Deze lijkt nog wél te werken!
prikdoor

Draadje met extra informatie:

Posted in Uncategorized | Leave a Comment »