Turns out adding XSRF, CSRF, See-Surf or whatever the name we call it now to an Angular app with a .NET Core Web API is really really easy.
... ➦Images on the internet should always be optimized where possible to reduce the load time of your websites. Of course the best solution is to use a CDN but sometimes for whatever reason like me you inherit some folders full of unoptimized images you can run the following commands to reduce the load on your server. These could also be added to batch files and run in the scheduler if required.
... ➦- Starting with an empty .NET Core Console Application add the following packages:
Microsoft.Extensions.DependencyInjection
Microsoft.Extensions.Logging
Microsoft.Extensions.Logging.Console
- Instantiate Microsoft’s Dependecy Injection Service Provider.
var serviceProvider = new ServiceCollection().BuildServiceProvider();
- Register the Console Logging Provider dependency with the Service Provider using Microsoft’s extension methods
var serviceProvider = new ServiceCollection().AddLogging(cfg => cfg.AddConsole()).BuildServiceProvider();
... ➦By default the lifetime of the logging service is set to Singleton.
Occasionally I inherit an old development database server containing many databases and I usually have no idea which are no longer in use. I came across the following script that allows you to see the last time a database was accessed:
... ➦As I’m moving more and more into management I need ways to keep my coding foo fresh so I have taken to solving small problems from various sites on the internet in my spare time. I also miss that feeling of being in the zone and fully engaged in something just difficult enough to stretch myself.
... ➦After cloning my Hugo site to a new machine and running:
... ➦After deploying this blog to Amazon S3 with CloudFront the main page rendered correctly but any pages in sub folders like /posts or /posts/post-vanity-url would recieve the following error:
After upgrading my Hugo theme to the Hyde inspired Hyde-Hyde theme I also needed to switch from the standard Hugo build to the extended build in order to use the pipes feature.
... ➦I do security work often but not often enough that I don’t end up Googling many of the terms and concepts every time. Here is a list of the best articles as a quick goto:
... ➦You can use selfssl from the IIS 6 Resource Kit to quickly add self signed SSL certs for local development.
... ➦