Blog

NginX as a reverse proxy with Nginx Proxy Manager

Lately I have started playing with Kubernetes and wanted to expose some of the locally hosted services on internet. The situation is that I want to expose multiple clusters running on separate machines through the same IP address and port. Checking around it seems nginx is the the best option. Keep in mind that even you want to expose just one service it is still good idea to do it through nginx.

I have installed Ubuntu 20.04.3 on Raspberry Pi …

Read more

First look at .NET Interactive and Jupyter

Wouldn’t be nice to have a place to test some quick things with C# in Jupyter Notebook?
You can do it now!

In the beginning of February 2020, Microsoft announced the second preview of .NET Notebooks experience.

What is .NET Interactive. It is a group of CLI tools and APIs that allow the users to create interactive experience across the web, markdown and notebooks.

.NET Interactive components.

Read more

Install Windows IoT Core on Raspberry Pi 3B

Last years Microsoft and Windows are being transformed and got a lot of improvements. Windows is now running smoother and with less errors than before, so I decided to give it a try and install it on one of my Raspberry Pi 3Bs. Also I want to run a .NET Core on it (It will be in another article). I know it support Linux, but still.

Let’s get started.

First, go to https://docs.microsoft.com/en-us/windows/iot-core/downloads and download the Windows 10 IoT Core …

Read more

Selecting local NuGet server

Doesn’t matter if you are a big corporation, small company, a team of people or even a single person writing software it is worth organizing your code in modules and reuse it.

Using .NET (Standard/Core/Framework …) has the advantage of NuGet. It is open source package manager for .NET. You can use the public feed on https://www.nuget.org/, run your own NuGet server or create a local feed.

Let’s start with the simplest one – Local Feed.
Local NuGet package …

Read more

How to create .NET Core NuGet Package in Visual Studio 2019

What is .NET Core?
.NET Core is an open source platform supported by Microsoft that can run on Windows, Windows, macOS and Linux operating systems and across multiple architectures including x64, x86 and ARM.
You can use multiple languages to write applications and libraries for .NET Core – C#, Visual Basic and F#.

In order to create a NuGet package with Visual Studio 2019 – select new Class Library (.NET Core) project.

I am going to call the project LoggingLib. …

Read more

FPL On Call box wiring

These days I was changing my pool pump controller and I had to call FPL for their On Call box that is connected before my pool pump. As it tunred out they still don’t support these boxes when you want to install a electronic pump controller.

Anyway I had some problems figuring out the wires before that. I was left with the impression that the entire box is entirelly between the input lines and the pump. It turned out it’s …

Read more

Get values of all the properties of a PowerShell object

Lets say you want to list all properties of an object but you don’t know all of them by name. Here is comming in help the Get-Member cmdlet. I find it very useful especially when working with new objects that I’m not familiar with.

I’m going to give an example with the list of network adapters listed from the WMI.

 So, lets list all of the members.

Get-Wmiobject Win32_NetworkAdapter | where { $_.Speed -ne $null -and $_.MACAddress -ne $null } 
Read more

How to recover mdadm RAID array after superblock is zeroed

Few days ago I got one of my Linux RAID1 arrays go bad. One of the disks got bad sectors and the other one lost it’s superblock. So the array was degradated and the only one “good” disk was with bad sectors. I added a new disk and tried to sync the data but it stucked on 36%. Using tools like “dd” or “ddrescue” didn’t help neither. The “dd” just kept stopping and the “ddrescue” was recovering with 364Bytes/second so …

Read more

XSLT processor with PowerShell

Here is a simple way to transform XML document with specified XSL in PowerShell. It is easy achieavable using the System.Xml.Xsl namespace of the .NET.

PARAM
(
    [Parameter(Mandatory = $true)]
    [ValidateNotNullOrEmpty()]
    [String]$XmlPath,
     
    [Parameter(Mandatory = $true)]
    [ValidateNotNullOrEmpty()]
    [String]$XslPath,
     
    [Parameter(Mandatory = $true)]
    [ValidateNotNullOrEmpty()]
    [String]$HtmlOutput
)
 
try
{
    $XslPatht = New-Object System.Xml.Xsl.XslCompiledTransform
    $XslPatht.Load($XslPath)
    $XslPatht.Transform($XmlPath, $HtmlOutput)
     
    Write-Host "Generated output is on path: $HtmlOutput"
}
catch
{
    Write-Host $_.Exception -ForegroundColor Red
}

We pass the path to the XML file and the path to the …

Read more

Install and configure NuttX ARM build environment in Linux

In this manual will see how to install and configure all the tools needed to build NuttX for ARM under Linux. The toolchain is the one comming with the Ubuntu itself (at least with the new versions of Ubuntu). The version of LInux I’m using is Ubuntu 14.04.

1. Install the Ubuntu 14.04 and update all the packages.

2. Install the ARM toolchain

sudo apt-get install gcc-arm-none-eabi

3. Install kconfig-frontends package

This package is used by the NuttX to configure …

Read more