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

Archive for March, 2019

7zip on ESXi through p7zip – redux

Posted by jpluimers on 2019/03/12

Steps to get it working on ESXi 6.x with p7zip 16.02:

  1. Copy the output of https://sourceforge.net/projects/p7zip/files/p7zip/16.02/p7zip_16.02_x86_linux_bin.tar.bz2/download to a place where you can reach it through http (as wget on ESXi does not understand https)
  2. Follow the script below

mkdir -p /local/bin
cd /local bin
wget http://192.168.71.62/esxi/netcologne.dl.sourceforge.net/project/p7zip/p7zip/16.02/p7zip_16.02_x86_linux_bin.tar.bz2
bzip2 -d p7zip_16.02_x86_linux_bin.tar.bz2
mv p7zip_16.02/bin/7z* .
chmod 755 7z 7za 7zra

Based on much longer steps involving Windows and an older version of p7zip: 7zip on ESXi through p7zip.

–jeroen

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

IDE Fix Pack 6.4 for Delphi 2009,XE-10.2 Tokyo and 6.4.1 for Delphi 2010 and 10.3 Rio

Posted by jpluimers on 2019/03/12

On my list of things to install soon IDE Fix Pack 6.4 and 6.4.1:

Technically, there is 6.4 that works in Delphi 10.3 Rio Update 1, but it is better to install 6.4.1 as it works with 10.3 and 10.3.1:

The dependencies file looks interesting for good uses list optimisation, given that you compile with all conditional define permutations:

There is a ton of changes, of which I like the bold ones most:

6.4

  • Fixed: Packages with duplicate units may not have caused a fatal compiler error.
  • Added: Support for Delphi 10.3 Rio
  • Added: StyleUtils.inc performance optimizations for faster UI rendering (D10.3)
  • Added: Infinite loop detection in TDebugger.UpdateEventLog
  • Added: Fix for TStringList.IndexOfName bug (RSP-21633)
  • Added: Fix for access violation in the Welcomepage JScript9.dll binding
  • Added: TCustomListBox.ResetContent is skipped if the handle isn’t created yet
  • Added: More STRINGCHECKS-free RTL code (2009/2010)
  • Added: More DFM Streaming optimizations
  • Added: RTL and DFM streaming patches to remove STRINGCHECKS (2009/2010)
  • Added: Removed VclFixPack OutputDebugString calls (2009)
  • Added: FillChar uses Enhanced REP MOVSB/STOSB cpu feature if available for large sizes.
  • Added: Enabled CPU LOCK string assignment optimization for local variables
  • Added: -x-Oe (experimental optimizations) and -x-cgo compiler option extension
  • Added: CodeGen: Remove of some unnecessary push/pop operations
  • Added: Expression Evaluator allows array access to pointers even if the type wasn’t declared with {$POINTERMATH ON}
  • Added: Max number of constants in a function was increased from 64K to 16M (2009-XE3)
  • Added: New compiler option extensions: -x–compileonly, -x–reslist, -x–depfile, -x–unitstats
  • Added: More performance optimization for the DCC64 compiler
  • Added: TStringBuilder.SetLength optimization [RSP-19178] (XE+)
  • Added: TStrings.GetDelimitedText optimization
  • Improved: Slight faster TStringList.IndexOfName optimization for sorted string lists.

6.4.1

  • Fixed: StyleUtils.inc patch contained a hard coded address causing the patch to fail if the DLL’s base address was relocated. (10.3 only)
  • Fixed: TCustomListBox.ResetContent patch crashed with an access violation. (2010 only)

–jeroen

Read the rest of this entry »

Posted in Delphi, Development, Software Development | Leave a Comment »

How do I export the history from the Windows command line to a text file? – Super User

Posted by jpluimers on 2019/03/11

I totally did not know that DOSKEY was part of CMD.EXE, but it is: [WayBack] How do I export the history from the Windows command line to a text file? – Super User

Even better: it can export the command history:

doskey /HISTORY > history.txt

Related:

–jeroen

Posted in Console (command prompt window), Power User, Windows | Leave a Comment »

{Updated} Linux server security checklist. #sysadmin 

Posted by jpluimers on 2019/03/11

Most tips are OK, but:

  1. for password related policies, please read these:
  2. If you do DNS, implement DNSSEC
  3. I think ipv6 is OK, but like ipv4 needs to be firewalled
  4. Be really careful with fail2ban and similar tools: they are easy ways to lock yourself out as well, for instance by someone doing a nice (D)DoS on you.

Tips: [WayBack40 Linux Server Hardening Security Tips [2017 edition] – nixCraft

Via:

–jeroen

Posted in *nix, *nix-tools, Encryption, Let's Encrypt (letsencrypt/certbot), Power User, Security | Leave a Comment »

PS/2 port colours – Wikipedia

Posted by jpluimers on 2019/03/11

I always forget which colours the [WayBackPS/2 port for keyboard and mouse have.

Some of my old (some call it classic or vintage) mice and keyboards don’t even have a coloured plug.

Luckily, Wikipedia has the answer File:Ps-2-ports.jpg – Wikipedia :

Color Description
Purple Keyboard
Green Mouse

–jeroen

 

Posted in History, Keyboards and Keyboard Shortcuts, Power User | Leave a Comment »

sorting – Is there a Windows equivalent to the Unix uniq? – Super User

Posted by jpluimers on 2019/03/08

TL;DR:

  • Windows 10 has an undocumented /unique switch for sort
  • git for Windows ships with uniq (in a default x64 install, it is at C:\Program Files\Git\usr\bin\uniq.exe)

From [WayBack] sorting – Is there a Windows equivalent to the Unix uniq? – Super User

This works fine:

dir /s /b *0*.pas *1*.pas *2*.pas *3*.pas *4*.pas *5*.pas *6*.pas *7*.pas*8*.pas *9*.pas | sort /unique > pas-files-with-numeric-names.txt

I need remove duplicate lines from a text file, it is simple in Linux usingcat file.txt |sort | uniqwhen file.txt containsaaabbbaaacccIt will output aaabbbcccIs there a Windows

 

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

sudo command doesn’t source /root/.bashrc – Unix & Linux Stack Exchange

Posted by jpluimers on 2019/03/08

TL;DR:

  • sudo -i is not an interactive logon to root
  • sudo -i bash is interactive and *does* execute /root/.bashrc

Source: [WayBack] sudo command doesn’t source /root/.bashrc – Unix & Linux Stack Exchange

–jeroen

Posted in *nix, *nix-tools, bash, Power User | Leave a Comment »

Reminder tip: Disable Wi-Fi during sleep to dramatically increase idle battery life on tablets and devices you don’t often use

Posted by jpluimers on 2019/03/08

I agree: [WayBack] It’s so obvious I hadn’t thought about this.. – Roderick Gadellaa – Google+.

[WayBackReminder tip: Disable Wi-Fi during sleep to dramatically increase idle battery life on tablets and devices you don’t often use

–jeroen

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

detect availability of node-set() function in xslt implementation of icecast server – Stack Overflow

Posted by jpluimers on 2019/03/07

Wow, I totally forgot I had done this xslt trick eons ago: [WayBackdetect availability of node-set() function in xslt implementation of icecast server – Stack Overflow

–jeroen

Posted in Development, Software Development, XML/XSD, XSLT | Leave a Comment »

How can I rename a git stash? – Stack Overflow

Posted by jpluimers on 2019/03/07

SourceTree does not like it when by accident two git stash entries have exactly the same name.

To work around that, you have to rename one.

The easiest way to do this is on the console using the tips from [WayBack] How can I rename a git stash? – Stack Overflow (thanks [WayBack] qzb):

$ git stash list
stash@{0}: WIP on master: Add some very important feature
stash@{1}: WIP on master: Fix some silly bug

First, you must remove stash entry which you want to rename:

$ git stash drop stash@{1}
Dropped stash@{1} (af8fdeee49a03d1b4609f294635e7f0d622e03db)

Now just add it again with new message using sha of commit returned after dropping:

$ git stash store -m "Very descriptive message" af8fdeee49a03d1b4609f294635e7f0d622e03db

And that’s it:

$ git stash list
stash@{0}: Very descriptive message
stash@{1}: WIP on master: Add some very important feature

This solution requires git 1.8.4 or later, and yes, it works with dirty working directory too.

Some other useful git stash commands:

–jeroen

Posted in Development, DVCS - Distributed Version Control, git, Software Development, Source Code Management, SourceTree | Leave a Comment »