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,680 other followers

Archive for August 24th, 2016

Update to List-Delphi-Installed-Packages.ps1 shows HKCU/HKLM keys and doesn’t truncated fields any more

Posted by jpluimers on 2016/08/24

I’ve posted an update to List-Delphi-Installed-Packages.ps1 that:

  • added HKCU/HKLM registry key values for each BDS version
  • doesn’t truncate fields any more when your console has limited width
  • is now in UTF-8 format so the BitBucket web-interface can show it

For the first two: Phry for helping me to force Format-Table to show more than 10 columns and pointing me how find out how to do this with Out-String so it doesn’t truncate fields; blog post about it will follow.

Now – as I can display more than 10 columns- I can start working in integrating all the other info about various BDS versions.

Source is at https://bitbucket.org/jeroenp/besharp.net/src/tip/Native/Delphi/Scripts/List-Delphi-Installed-Packages.ps1?fileviewer=file-view-default

A text dump of the current output is below with the Delphi versions including CompilerVersion, RTLVersion, VERXXX Define, DllSuffix and more.

–jeroen

via: If you need to know underlying information on Delphi versions « The Wiert Corner – irregular stream of stuff

Read the rest of this entry »

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

APC: getting ftp://ftp.apc.com/apc/public/software/pnetmib/mib/417/powernet417.mib turned out to be tricky

Posted by jpluimers on 2016/08/24

I tried updating my downloads for my APC7920 and APC7921 PDUs.

I knew the APC download site http://www.apc.com/nl/en/tools/download/index.cfm was slow and navigation unfriendly (lots of ERR_CACHE_MISS as you cannot ctrl-click on downloads), but it’s also buggy: Some of the ftp download URLs do not contain the authentication and one file would not download at all.

The solution for that is to prepend the credentials as username:password@ like these URLs where each first one is generated by the download site and each second one works:

  • ftp://ftp.apcc.com/restricted/hardware/nmcard/firmware/devipcfg_wiz/502/Device%20IP%20Configuration%20Wizard.exe
  • ftp://restrict:Kop$74!@ftp.apcc.com/restricted/hardware/nmcard/firmware/devipcfg_wiz/502/Device%20IP%20Configuration%20Wizard.exe
  • ftp://ftp.apc.com/restricted/hardware/nmcard/firmware/sec_wiz/104/SecWiz%201.04%20Install.exe
  • ftp://restrict:Kop$74!@ftp.apc.com/restricted/hardware/nmcard/firmware/sec_wiz/104/SecWiz%201.04%20Install.exe

The username is restrict and the password Kop$74! which requires single quotes on the command-line to prevent parameter and event expansion.

Otherwise you will get bash errors like these: event not found for the part starting with an exclamation mark and Login incorrect. for the parts having a dollar.

One file would not download at all: ftp://ftp.apc.com/apc/public/software/pnetmib/mib/417/powernet417 as all download attempts would time out:

  • Chrome with and without username:password@ (you will get a ERR_FTP_FAILED)
  • wget with and without username:password@ (it will result in a )
  • plain curl with and without username:password@ (it will result in a curl: (28) Timeout was reached)

The only command that would work was this:

curl -G ftp://ftp.apc.com/apc/public/software/pnetmib/mib/417/powernet417.mib > powernet417.mib

via: SimplicityGuy/pynoc – Travis CI

The trick is to:

  1. leave username and password away
  2. specify the -G (or –get) parameter forcing GET behaviour (which should be the default).

I’m not sure why it works, but it does.

–jeroen

Posted in *nix, APC Smart-UPS, cURL, Power User, UPS | Leave a Comment »

List goals/targets in GNU make that contain variables in their definition – Stack Overflow

Posted by jpluimers on 2016/08/24

*nix systems tools often are have write-only maintenance tricks:

alias make-list-target='make -qp | awk -F":" "/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ {split(\$1,A,/ /);for(i in A)print A[i]}"'

Like usual, I have only a vague idea what the regex expressions do.
–jeroen

via List goals/targets in GNU make that contain variables in their definition – Stack Overflow.

Posted in Awk, bash, Development, Scripting, Software Development | Leave a Comment »

 
%d bloggers like this: