Skip to main content
Advanced Search
Search Terms
Content Type

Exact Matches
Tag Searches
Date Options
Updated after
Updated before
Created after
Created before

Search Results

156 total results found

Raspberry Pi - DotNet Setup

Raspberry PI

Here’s a short article for setting up a Raspberry PI to run DotNet. Reference Articles We are following this article series: Page #1: RP #01: Setup your Raspberry Pi with Raspberry Pi OS Page 2: RP #02: Install .NET and develop your first .NET application ...

dotnet
.net
programming
RaspberryPi

NET Core Func Variables

.NET

Here are some use cases for a Func. Func as Method Callback If you want to have a lambda that you pass to a method, like a callback or completion handler, here is an example. Declare the Func, like this: Func<int, int, Task<int>> sigcallback = async (callb...

.net
programming
dotnet

Regex Notes

Other

Good site for testing Regex matching strings: https://regex101.com/r/iY5hU9/1

programming

C# Unit Tests with Async Task Signature

.NET

When writing unit tests, it’s good to standardize as much as possible.This includes the method signature for each test cases, such as this: // Test_1_1_1 Describe the test... [TestMethod] public async Task Test_1_1_1() { // Do some testing... ... ...

testing
programming
.net
dotnet
unittests

HowTo Retrieve Key and Cert from PFX

System Administration

Here’s a good article on how to export SSL certificates, extract the key and certificate, and import it into AWS. How To Convert Windows PFX Certificate Files Into PEM Format On Linux The above article uses openSSL, which can be found for Windows, here: Win...

SSL
Certificates
Administration
PFX

Jenkins References

Jenkins

Jenkins Tutorial — Part 5 — When Conditions Conditionals in a Declarative Pipeline Jenkinsfile Jenkins Declarative Pipeline Tutorial Declarative Pipeline With Jenkins - DZone Refcards

Jenkins
Administration

Linux Disk Usage

System Administration

Linux has a few means to analyze a disk for space usage. One way, is a package called, ncdu. It can be downloaded with: sudo apt install ncdu You execute it, like this: sudo ncdu -x / NOTE: -x forces it to stay within the same filesystem, and not travers...

Administration
Linux
infrastructure

Creating SSH Keys in Linux

System Administration

Creating an SSH key is straightforward on a linux client, using this command: ssh-keygen By default recent versions of ssh-keygen will create a 3072-bit RSA key pair, which is secure enough for most use cases (you may optionally pass in the -b 4096 flag to c...

SSH
Administration
Linux

Process Logging Behavior

.NET

Here’s my current conventions for logging in application processes. Logging features, here are implemented by the Logging class in OGA.Common.Lib. Logging Phases We use three distinct logging phases for an application, each with a distinct purpose. Ear...

.net
dotnet
programming
logging

Dotnet Dev on Linux

.NET

To create a new project at the current folder: dotnet new console --framework net6.0 --use-program-main To run the app: dotnet run  

programming
.net
dotnet
Linux

NET Core Error Responses

.NET

Here’s a decent mechanism for returning useful errors from a WEB API. Aside: We have a standing test API (OGA.RESTAPI_Testing.Service) that will return examples of this, here: http://192.168.1.201:4250/swagger/index.html We can compose an instance of the Pro...

.net
dotnet
programming
REST

NET Core Test API

.NET

We have a standing REST API with various endpoints for simulating different method types, return errors, and such. It’s Swagger page is, here: http://192.168.1.201:4250/swagger/index.html

.net
dotnet
programming
infrastructure
testing

Kali in VMWare

System Administration

Here are some things for installing Kali in a VMWare VM. Adapted from here: https://www.kali.org/docs/virtualization/install-vmware-guest-vm/   Choose the latest Workstation Hardware version. 16.x is current as of this writing. Kali is debian based, so use...

Linux
deployment

Six Ways to Multi-Thread

.NET

Six ways to initiate tasks on another thread in .NET

dotnet
.net
programming

Create PFX Cert File (for IIS)

System Administration

Windows IIS requires a pfx file when importing an SSL certificate. This can be created from a crt and a key file using openssl and the following steps. Locate the openssl.exe on your system. It is usually installed as part of git, and located, here:C:\Progra...

SSH
IIS
Certificates
Administration

Return Multiple Values from Async Method

.NET

Async method cannot have Ref or an Out parameters. So, we cannot pass back data from them through typical syntax. This requires us to be a little creative. One way around this CLR limitation is to use tuples.Specifically, we can use an implicit tuple, that wi...

programming
.net
dotnet

Strongly Typed Constant Parameters

.NET

You will eventually run into the need for a function to accept a restricted set of value for a parameter.One way to solve this is with an enum. But, enums can be cast and overrode, without concern.So, here’s a more type-safe method. This technique uses stron...

PostgreSQL Permissions

PostgreSQL

Here are three major points you need to understand about object ownership: Only a superuser or the owner of an object (table, function, procedure, sequence, etc.) can ALTER/DROP the object. Only a superuser or the owner of an object can ALTER the own...

Administration
postgres
database

PostGreSQL .NET DateTime Usage

PostgreSQL

.NET EF Core 6 made a breaking change to how DateTime is stored in PostGreSQL. This article explains some of it and the workaround: https://github.com/npgsql/efcore.pg/issues/2000   To enable the workaround, add this to the Configure method of your Startup....

dotnet
.net
postgres
database

Docker Space Full

System Administration

Here are some things to check on when the disk on a docker host gets full sudo docker system prune -a -f This will cleanup other resource types: docker system prune -a This command will remove older logs from the container logs folder: sudo find /projec...

Administration
docker
Linux