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

Archive for the ‘Power User’ Category

Some links on xargs simulation in PowerShell

Posted by jpluimers on 2021/10/13

On nx, I’m used to xargs which allows to convert from a pipe of output into arguments passed to a command. This is useful, as many commands only accept arguments as parameters.

In PowerShell, you can usually avoid an xargs equivalent because commandlet output is a stream of objects that you can post-process using . I for instance used that in PowerShell: recovering from corrupt empty *.nupkg files after a disk was accidentally full during update.

Here are some xargs equivalency examples:

Read the rest of this entry »

Posted in *nix, *nix-tools, bash, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, xargs | Leave a Comment »

Some Windows 10 updates remove registry values; not sure how widely

Posted by jpluimers on 2021/10/12

After watching an autologon system not logging on automatically over the past years, the pattern seems to be that at least major, and some less minor Windows updates remove autlogon parts of the registry.

I’m not sure where the boundary between “major” and “less minor” lies (though I suspect “cumulative updates” and larger), nor if more than these values are affected:

  • key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
    • value name AutoAdminLogon gets removed or becomes value 0
    • value DefaultUserName gets removed
    • value DefaultPassword gets removed

This means that now after each startup, I need to schedule a task that runs a script setting the values I need depending if a password is needed or not.

The script also needs credentials, so I need to figure out how to properly do that.

I still need to decide between PowerShell or batch file script, as I already have the batch file from How to turn on automatic logon in Windows and automatic logon in Windows 2003.

For my future reference, some more links on things that can get deleted:

Hopefully these links will help me writing the scripts:

–jeroen

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

SwitchResX Configuration · GitHub: SwitchResX Settings for LG 21:9 UltraWide

Posted by jpluimers on 2021/10/11

[WayBack] SwitchResX Configuration · GitHub: SwitchResX Settings for LG 21:9 UltraWide

Works for other monitors, versions of MacOS/OS X/Mac OS and SwitchResX as well.

–jeroen

Posted in Apple, Mac OS X / OS X / MacOS, Power User | Leave a Comment »

Fail: The OnePlus Messages App requires Android 11 even though that has not been rolled out to all compatible devices yet (might become a security issue)

Posted by jpluimers on 2021/10/11

Too bad: if your OnePlus device is on the list of obtaining Android 11, the OnePlus Messages App already requires it, so it won’t upgrade which means you are missing out on any potential security issues.

App: [Wayback/Archive.is] OnePlus Messages – Apps on Google Play

Device: OnePlus 6 – Wikipedia

Android 11 is in a staged rollout since mid August 2021:

You can force update to Android 11:

Twitter thread:

 

–jeroen

Read the rest of this entry »

Posted in Android Devices, OnePlus Six, Power User | Leave a Comment »

Post verkeerd bezorgd | PostNL

Posted by jpluimers on 2021/10/11

Post die verkeerd is bezorgd kun je gewoon in de oranje brievenbus stoppen of afgeven bij een PostNL-locatie.

Post gericht aan iemand anders

Waarschijnlijk heb je post ontvangen voor de vorige bewoner(s). Je kunt de post terugsturen naar de afzender. Dit doe je als volgt:

  • Zet met pen een kruis door de adresgegevens.
  • Schrijf op de envelop (of kaart) ‘Vertrokken – Retour afzender‘.
  • Stop de post in een oranje brievenbus of geef deze af op een PostNL-locatie.
  • PostNL stuurt alle zendingen retour naar de afzender. Ook als je het nieuwe adres van de geadresseerde op de envelop hebt geschreven.

Source: [WayBack] Post verkeerd bezorgd | PostNL

Via: [WayBack] Wat moet je doen met andermans post die al jaren niet meer op dit adres woont? – Startpagina GoeieVraag

–jeroen

Posted in LifeHacker, Power User | Leave a Comment »

Als werknemer niet expliciet met digitale loonopgave instemt, moet werkgever deze op papier aanleveren

Posted by jpluimers on 2021/10/08

Accepteren van digitale loonopgave door werknemer hoeft niet; als deze niet instemt (of zelfs afwijst) moet werkgever deze op papier blijven verstrekke.

Citaat uit [WayBack] wetten.nl – Regeling – Burgerlijk Wetboek Boek 7, Titel deel10, Afdeling 2,_Artikel 626 – BWBR0005290:

  1. De werkgever is verplicht bij elke voldoening van het in geld vastgestelde loon de werknemer een schriftelijke of elektronische opgave te verstrekken van het loonbedrag, van de gespecificeerde bedragen waaruit dit is samengesteld, van de gespecificeerde bedragen die op het loonbedrag zijn ingehouden, alsmede van het bedrag van het loon waarop een persoon van de leeftijd van de werknemer over de termijn waarover het loon is berekend ingevolge het bepaalde bij of krachtens de Wet minimumloon en minimumvakantiebijslag recht heeft, tenzij zich ten opzichte van de vorige voldoening in geen van deze bedragen een wijziging heeft voorgedaan.
  2. De opgave vermeldt voorts de naam van de werkgever en van de werknemer, de termijn waarover het loon is berekend, alsmede de overeengekomen arbeidsduur.
  3. De werkgever verstrekt de elektronische opgave op zodanige wijze dat deze door de werknemer kan worden opgeslagen en voor hem toegankelijk is ten behoeve van latere kennisneming.
  4. Voor het verstrekken van een elektronische opgave is uitdrukkelijke instemming van de werknemer vereist.
  5. Van dit artikel kan niet ten nadele van de werknemer worden afgeweken.

–jeroen

Read the rest of this entry »

Posted in LifeHacker, Power User | Leave a Comment »

Kristian Köhntopp on Twitter: “Modaler Filter für Veloziraptoren… ” (0 factor authentication)

Posted by jpluimers on 2021/10/08

[WayBack] Kristian Köhntopp on Twitter: “Modaler Filter für Veloziraptoren… “

–jeroen

Read the rest of this entry »

Posted in Authentication, Power User, Security | Leave a Comment »

T-Shirt quotes on threading and procastrination

Posted by jpluimers on 2021/10/07

–jeroen

Read the rest of this entry »

Posted in Development, Fun, LifeHacker, Power User, Quotes, Software Development, T-Shirt quotes | Leave a Comment »

More on empty files

Posted by jpluimers on 2021/10/07

TL;DR: Empty files are indeed of size zero, but there is some disk space involved for their meta-data (like name, permission, timestamps)

Some links (via [WayBack] create zero sized file – Google Search):

  • [WayBack] Zero-byte file – Wikipedia
  • [WayBack] filesystems – How can a file size be zero? – Super User (thanks [WayBack] phuclv):

    Filesystems store a lot of information about a file such as file name, file size, creation time, access time, modified time, created user, user and group permissions, fragments, pointer to clusters that store the file, hard/soft links, attributes… Those are called file metadata. Why do you count those metadata into file size when users do not (need to) care about them and don’t know about them? They only really care about the file content

    Moreover each filesystem stores different types of metadata which take different amounts of space on disk. For example POSIX permissions are very different from NTFS permission, and there are also inode numbers in POSIX which do not exist on Windows. Even POSIX filesystems vary a lot, like ext3 with 32-bit block address, ext4 with 48-bit, Btrfs with 64-bit and ZFS with 128-bit address. So how will you count those metadata into file size?

    Take another example with a 100-byte file whose metadata consumes 56 bytes on the current filesystem. We copy the file to another filesystem and now it takes 128 bytes of metadata. However the file contents are exactly the same, the number of bytes in the files are also the same. So displaying file size as 156 bytes on a system but 228 bytes on another is very confusing and counter-intuitive.

  • [WayBack] What is the concept of creating a file with zero bytes in Linux? – Unix & Linux Stack Exchange:

    touch will create an inode, and ls -i or stat will show info about the inode:

    $ touch test
    $ ls -i test
    28971114 test
    $ stat test
      File: ‘test’
      Size: 0           Blocks: 0          IO Block: 4096   regular empty file
    Device: fc01h/64513d    Inode: 28971114    Links: 1
    Access: (0664/-rw-rw-r--)  Uid: ( 1000/1000)   Gid: ( 1000/1000)
    Access: 2017-03-28 17:38:07.221131925 +0200
    Modify: 2017-03-28 17:38:07.221131925 +0200
    Change: 2017-03-28 17:38:07.221131925 +0200
     Birth: -
    

    Notice that test uses 0 blocks. To store the data displayed, the inode uses some bytes. Those bytes are stored in the inode table. Look at the ext2 page for an example of an inode structure [WayBack].

Oh and a nice NTFS thing (thanks [WayBack] Paweł Bulwan):

and in case of NTFS, the size of file reported by Windows and most tools is actually the size of the main stream of the file, which we perceive as the content of the file. The file stored on NTFS partition can additionaly have some data stored in alternative data streams, and still have the reported size of 0. It’s a nice filesystem feature to know if you want to have the full picture :)

Related: my really old post command line – create empty text file from a batch file (via: Stack Overflow)

–jeroen

Posted in *nix, btrfs, Development, File-Systems, NTFS, Power User, Software Development, Windows | Leave a Comment »

Teams, hats and colours

Posted by jpluimers on 2021/10/06

I learned a few new things a while ago, but still have a hard time to get the association between colours and meanings right.

Colours:

  • white: friendly / sanctioned / by permission
  • black: enemy / unsanctioned
  • red: attacks by permission
  • blue: defends by permission

Based on these tweets and links:

 

–jeroen

Read the rest of this entry »

Posted in Development, LifeHacker, Power User, Security, Software Development | Leave a Comment »