Category Archives: Uncategorized

Code sharing between VS and Unity 3D

In my previous blog post I covered how I usually set up new .Net projects. The post covered both naming convention, .Net Standard and .Net Core. In this post I will show a four ways you can share code between .Net projects and Unity 3D projects. There are several good reasons why you would like to do this.… Read More »

Automatic class generator for CsvHelper

CsvHelper helps in reading CSV files. But creating the model and mapper classes can be a bit time consuming. On this page you can generate the classes. Just fill inn the fields bellow with the header for your CSV file. It will generate the model and a mapper class. Code sample to use classes generated:

  Name: Header:… Read More »

IIS redirect HTTP to HTTPS but allow Let’s Encrypt

Let’s Encrypt makes it easy for everyone to use HTTPS. The Windows client letsencrypt-win-simple simplifies installing and updating certificate in IIS. Using IIS URL Rewrite function you can allow Let’s Encrypt certificate retrieval/renewal and redirect all visitors to HTTPS URL of site.

 

Template replacement engine

Using Regex as a template engine is an efficient way to replace strings in a template. Regex replace method supports executing a method upon match. We can populate a dictionary and make a lookup on all matches. This way we do the replacement in a single pass, rather than executing multiple .Replace(). Since dictionaries can be made case insensitive we have… Read More »

Investigating Unity hang on second run (multi-threading)

Background he problem of Unity hangs on second run may have multiple causes and can sometimes be difficult to debug. When searching for an answer I see many with the same problem. I am therefore sharing a my debugging process in hope that it can help others solve their own problem. The problem Unity has had a problem… Read More »

ASP.Net 5 Areas

Visual Studio 2015 with ASP.Net 5 doesn’t support Areas in the GUI editor. Hopefully that will come, but until then here is a simple workaround. Create folder structure In the root of your project (not wwwroot) create the folder structure for Areas manually. In this example I created an area named “Foobar”. Edit Startup.cs to add routes for… Read More »

Image sizes of GIF, PNG, and JPEG after compression

When working with storage and network it is sometimes useful to know the estimated size of image. Should it be stored in SQL/NoSQL, locally, to CDN? Quite a few times have I tried to get a quick answer by Google, but its not that easy. So today I figured I’d write up a quick app, convert an image… Read More »

Norton Antivirus Idle Scan

I always thought that when Norton Antivirus ran an “idle scan” it meant it would scan the computer when I was in front of it. But very often I find Norton scanning my disks while I’m sitting in front of my computer. So I thought I’d investigate. It seems I was idle about 8 minutes ago. At that… Read More »