Install Latest Docker on Debian 10 (Buster)

I prefer to install docker on Debian due to the stability of all the packages in the OS plus it has only the stuff you need (compared to Ubuntu). But unfortunately that means you will also get an outdated version of docker engine. Here is how to install the latest version of docker in Debian. First of all you should be installing docker using a non-root user, installing stuff using a root account opens another can of worms in the form of security issues.

Unit Testing Private(Protected) Methods in C#

Any developer that you speak to, will tell you the importance of unit testing, not only its a check against your logic, but it also avoids bugs and helps you to have confidence in your work that goes into production. Usually when creating private methods within a class, that private method is tested by covering the public method(s) that calls the private method. But in some cases, if you just want to write unit tests to validate that your private method is doing what it is supposed to do, then this article is for you.

Visualize Power Usage of Home Appliances Using Grafana Prometheus and TP-Link Plugs

At home when we use power intensive appliances, this is a nifty little dashboard designed by fffonion to easily view the power usage of each appliance in your home/office, all credits go to fffonion and contributors to the plug exporter project. Prerequisites TP-Link HS110 smart plug with energy monitoring (AmazonLink) A server to run docker containers A little bit of Linux terminal knowledge Basic knowledge on spinning up docker containers A router with ability to set static IP to connected devices TP-Link Setup I’m going to assume you have setup your TP-Link smart plug (using their KASA app) and its running in your network.

Organize your DI registrations into modules when using built in DI in .NET Core

I love Microsoft.Extensions.DependencyInjection a.k.a Built in DI in .NET core. Although it lacks some of the advance configurations supported by other DI frameworks like Autofac, the reason it wins me over every time is the simplicity and its super lightweight. One of the things it lacks in basic usage scenarios is that the ability to organize your registrations in the assembly level and not exposing everything in public methods. Or maybe I’m spoilt by Ninject and Autofac.

Dependency Injection in .NET Core Console Application using IHost

All .Net core app types in have a DI starting point or anchor point i.e startup.cs except console application. Here is a short guide to setup DI in a .NET Core console app. Let’s create a simple console app and the message “Hello World” lets move to an injected class later. So initially your console App’s entry method (Main) will look like this. class Program { static void Main(string[] args) { Console.

Low Powered Budget NAS Build 2020

Lots of people have a NAS in their home network. I had a QNAP TS-251 which is a great NAS, but once I got experienced I felt that their proprietary OS and platform lacks a lot of things that I wanted (mainly container management). So I decided to build my own low power NAS (obviously it will not be as low and efficient as theirs) also it would give me the opportunity to learn some awesome opensource NAS OS out there.