Loop Through The Diagonal Elements In Two Dimensional Array

Advertisement from Google If you need to only loop through the diagonal elements of the two-dimensional array you can use the following C# code (but should be more or less the same for any programming language): int width = 5; int height = 17; bool[,] array = new bool[width, height]; var ratio = width /… Read More »

5 Simple Steps to Migrate Let’s Encrypt Certificates (certbot) to a New Server

This guide is helpful for people who decided to migrate a website to another web server and have SSL certificates from Let’s Encrypt Note: This article describes the process for Ubuntu 18.04 but can also be used for other Linux distros (maybe with some small changes). As well, replace divbyte.com with your own domain  … Read More »

ASP.NET Core + PostgreSQL + Docker + Bitbucket = ♥

How to build, test and deploy your ASP.NET Core application in a single click (commit & push)? In this article I will answer this question and show you how to configure CI and CD with Docker and Bitbucket. We will develop simple ASP.NET Core application with single API method to save string value in database. We… Read More »

Nginx Server Blocks (Virtual Hosts) Example Template

Here is an example of the nginx server block (Virtual Hosts) which you can use to host multiple web sites on the same server. Just replace example.com with your own domain name. Do not forget to create all required folders and sent right permissions. Copy one of those templates to the /etc/nginx/sites-available/example.com Proxy example # Ivan Derevianko… Read More »

Deploy and run .NET Core application without installed runtime. Self-contained applications.

.NET Core framework provides one very useful feature – Self-contained application. You don’t need to install any .net runtime on your computer, you can just copy your application to the target host and run it. Furthermore, you can run it on any platform (Windows, Linux, OSX)! When you create a self-contained application, after publishing, you will see… Read More »

[Mono] Selenium with headless ChomeDriver on Ubuntu Server

If you want to run C# application (mono) with Selenium ChomeDriver on Ubuntu Server 16.04 in headless mode, you definitely should read this article. We will use Xvfb as X server, this will let us emulate “headless” mode because Xvfb performs all graphical operations in memory without showing any screen output. Install mono sudo apt-key adv –keyserver hkp://keyserver.ubuntu.com:80… Read More »