Jan David Narkiewicz (Developer)
Saturday, July 2, 2022
ASP.NET Core: Improving the Online Documentation (Open Source Contribution)
XmlDocument/C#: Improving the Online Documentation (Open Source Contribution)
The documentation for .NET's Xml Document class can be found at XmlDocument Class:
This documentation previewed in 2002 and was in need of some changes to make it more contemporary:
Visual Studio/Debug Local Docker Containers: Improving Online Documentation (Open Source Contribution)
Microsoft's documentation Debug apps in a local Docker container demonstrates how to debug applications in Docker containers:
Three changes I made to this page were committed by Microsoft:
Thursday, May 12, 2022
Xml Schemas/C#: Improving Online Documentation (Open Source Contribution)
While reading a code snippet in Microsoft's documentation, Reading and Writing XML Schemas I noticed the following example code:
The variable of type XmlSchema is named myschema. This is a C# example and prefixing variable names with the term "my" is a coding style associated with VB.NET.
I edited the page which brought me to Github. Github makes a fork and allowed me to suggest the change by creating a pull request. Here is updated documentation reflecting my accepted change:
Here is the notification that the pull request was merged into the main branch:
Saturday, April 9, 2022
Ubuntu/Linux/Hyper-V: Creating an Ubuntu 20.04 VM can be accessed from Hyper-V's Host Computer
I was assigned a project where a shell script had to be run remotely on an Ubunto 20.04 Virtual Machine (VM). The remote script failed on an Azure VM so I fell back on Hyper-V running on Windows 11. The way I traditionally configured an Ubuntu 20.04 VM did not permit SSH access from the host computer. These are the steps required to set up an Ubuntu 20.04 that can be configured to accept SSH connections from the host computer.
Create VM (Basic Ubuntu Install)
Create VM pre-installing Ubuntu from an Image
1) Download the Ubuntu 20.04 LTS from Download Ubuntu Desktop on the host computer. The format of the image download will be ISO.
2) Launch Hyper-V Manager on the host computer and make sure that the host computer name is selected in the left panel:
3) Select Action | New| Virtual Machine:
4) Navigate click Next in the New Virtual Machine Wizard under the Specify Name and Location panel is displayed:
5) Enter the name of the virtual machine to be created (the name above is devops02-ubuntu20.04) and click on Next:
6) From the Specify Generation panel select the Generation 2 radio button and click Next:
7) From the Configure Networking panel select Bridge (which allows external access to say the internet and provides access to the internal network, a.k.a. the LAN) which will enable access to the VM from the host computer (the VM will be assigned a local IP address) and click Next:
8) Configure the hard drives and click Next:
9) Specify the location of the Ubuntu install media and click on next:
10) Click Finish on the final setup screen:
Configure Ubuntu to Install from ISO
2) From Settings dialog select Hardware | Security from the pane on the left:
3) Click on OK.
Installing Ubuntu on the VM
2) From the per-VM connection dialog click on Start:
3) Clicking on Start displays the standard Ubuntu install wizard.
Verify Static IP Address
Saturday, April 2, 2022
Ubuntu/Linux: Configuring a host to support ssh Connections (Installing OpenSSH Server)
By default, an Ubuntu 20.04 instance does not contain an SSH server and hence there is no ssh access to the machine. To remedy this, install OpenSSH Server by:
1) Install the OpenSSH Server package:
sudo apt-get install -y openssh-server
2) Enable the service using systemctl enable:
sudo systemctl enable ssh
3) Start the service using the systemctrl start command:
sudo systemctl start ssh
4) On a different host, verify that the port for ssh (port 22) is open using the technique described in Ubuntu/Linux: How to tell if a Port is Open on a Remote Host:
echo > /dev/tcp/10.0.0.37/22 && echo "Port 22 (SSH) is open!"