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

Archive for May, 2019

svnrdump for dumping and loading remote svn repositories – twm’s blog

Posted by jpluimers on 2019/05/31

One day I will likely need svnrdump:

Since I keep forgetting what the tool is called and how to use it: svnrdump is a tool that can dump a remote svn repostory to a text file and also load that text file into a different remote svn repository…

Via: [WayBack] Since I keep forgetting what the tool is called and how to use it: svnrdump i…

–jeroen

Posted in *nix, Development, DVCS - Distributed Version Control, Power User, Subversion/SVN, Windows | Leave a Comment »

Determining the ESXi installation type (2014558) | VMware KB

Posted by jpluimers on 2019/05/31

Via [WayBackDetermining the ESXi installation type (2014558) | VMware KB

# esxcfg-info -e
boot type: visor-usb

That’s on my X10SRH-CF system which runs from USB.

Values you can get:

  • visor-pxe indicates a PXE deployment
  • visor-thin indicates an installable deployment
  • visor-usb indicates an embedded deployment

If your installation is visor-thin based (running from hard-disk), then you can convert it to visor-usb; the steps are at [WayBackvisor-thin & vsantraces – Hypervisor.fr (in French, but Google Translate is quite OK). It skips a few of the steps mentioned in [WayBack] How To Backup & Restore Free ESXi Host Configuration | virtuallyGhetto, so for saving your current config it’s best to follow these steps:

  1. Shutdown or suspend all VMs
  2. vim-cmd hostsvc/firmware/sync_config
  3. vim-cmd hostsvc/firmware/backup_config
  4. Copy the generated backup from /scratch/downloads (a UUID directory under it)to a safe location
  5. vim-cmd hostsvc/maintenance_mode_enter
  6. shutdown
  7. Install the same ESXi version on a USB disk
  8. Boot from the USB disk
  9. copy the backup to /tmp/configBundle.tgz
  10. vim-cmd hostsvc/firmware/restore_config /tmp/configBundle.tgz
  11. reboot

–jeroen

via [WayBackHow to tell if ESXi is installed to SD card or local HDD? : vmware

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

how to install OS remotly using Supermicro IPMI? – Server Fault

Posted by jpluimers on 2019/05/31

I wasn’t aware that IPMI more recent than 3.3 also supports virtual media, but in retrospect it’s very logical it does. When managing remote machines, you don’t walk up to it to switch physical media (:

Worked splendid on my X10SRH-CF based server, and even supports SMB based network shares.

The how-to is very simple, steps are for instance at these links:

Note: the for IPMI mounted ISO images, I found out that they will not work in UEFI mode and that you have to switch your BIOS back to LEGACY boot mode:

Read the rest of this entry »

Posted in Hardware, Mainboards, Power User, SuperMicro, X10SRH-CF | Leave a Comment »

Boek met tips voor ouders en broers/zussen die behandelbeslissingen moeten nemen voor een verstandelijk beperkt persoon

Posted by jpluimers on 2019/05/31

Ook voor brussen (boers/zussen):

De meeste ouders van een kind met een verstandelijke of meervoudige beperking komen meer dan eens voor een medische beslissing te staan voor hun kind. Wat kan en mag je als ouder/verzorger? Wat kan en mag een arts? Hoe ga je samen in gesprek en wat zegt de wet hierover? Hierover gaat het boek “Als je niet zelf kan beslissen”.

Source: [WayBack] Boek met tips voor ouders die behandelbeslissingen moeten nemen | BOSK

PDF: [WayBack] schouders.nl/…/beslissingen-boekje-2019-web.pdf

Via:

–jeroen

Posted in About, Awareness, Curatele, LifeHacker, Personal, Power User | Leave a Comment »

batch file – SHIFT doesn’t affect %* – Stack Overflow

Posted by jpluimers on 2019/05/30

Quoting the answer in full because it so tremendously useful [WayBack] batch file – SHIFT doesn’t affect %* – Stack Overflow.

Especially the quoting/dequoting bits and the clever trick reconstructing %* into a batch file variable (minus double spaces).

Thanks so much James-K!

As you know, shift has no effect on %*, but you can construct a %* equivalent.

We’ll call the following line.bat :

@echo off
set line=%1
:loop
shift
if not "%1"=="" (
  set line=%line% %1
  goto :loop
)

echo   %%* = %*
echo line = %line%

If you type in the following command (Notice the double space between 3 and 4) :

line 1 2 3  4 bla dee dah

You will get the following output :

  %* = 1 2 3  4 bla dee dah
line = 1 2 3 4 bla dee dah

Note that %* retains multiple spaces, while using the %n notation does not.


Using something like this, you can allow your users to put their parameters in any order.

:loop
  :: Single variable parameters
  if "%1"=="something" set something=true
  :: Multi variable parameters 
  if "%~1"=="/source" shift & set source=%1
  shift
if not "%~1"=="" goto :loop

Notice that in the Multi-variable parameter statement I include one shift statement and one setstatement separated by an ampersand (&). The & tells the command processor that a separate command to be executed follows.


EDIT:

FYI: I recommend double quotes when checking the contents of variables. Usually you can use anycharacter, and you don’t even need to use two because they are just there to insure that an empty variable does not cause an error. For instance, when %1 is empty and you do if not hello==%1 call :sub the command processor will see this if not hello== call :sub and compare hello to call then try to execute :sub, and throw an error. In that specific case if not xhello==x%1 call :sub is just as good as if not "hello"=="%1" call :sub, because an empty %1 will cause the command processor to see if not xhello==x call :sub.

BUT using characters other than double-quotes will cause problems if the variable contains any special characters.

Using brackets as variable delimiters like (%1) can cause problems. For instance, the (special) piping characters don’t play nice inside brackets, and the escape character just seems to disappear, neither acting as a normal character, nor as the escape-character.

Also brackets are special characters in and of themselves designed to group and/or separate different lines of code and may not always act as anticipated.

Lastly, double quotes themselves are special characters specifically designed to surround other special characters, allowing them to act as normal characters. This is why you may see variables unquoted, then quoted again, like so.

set var="%~1"  & REM This sort of thing is used to insure that a variable is quoted.
                 REM %~1 unquotes %1 if it is already quoted, and leaves it alone if
                 REM %1 is not quoted.

set "var=%~1"  & REM This code assumes that `%1` contains special characters and
                 REM like before unquotes a quoted %1, but leaves the variable itself
                 REM unquoted. The double-quotes surrounding the variable and data
                 REM protects the command processor from any special characters that
                 REM exist in the data. Remember that anytime you reference `%var%`,
                 REM you will need to also surround the variable and data with
                 REM double-quotes.

A quick check for quotes is if exist %1 if %1==%~1 echo Unquoted.

–jeroen

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

 
%d bloggers like this: