Dictionary-style settings as IOptions
I love how we can use appsettings.json files to configure applications in the .NET Core platform. The JSON-format feels a lot less bloated than the old XML appSettings config I used to work with. In this blog I’ll explore how to load a dictionary-style settings class as an IOption. This can be very useful when working with dependency injection.
Setup multiple setting-files with a .NET Console Application
In ASP.NET Core we are used to have multiple appsettings.json files with settings that differ per environment. I want to do the same in a Console Application. This makes debugging the application easier.
Finetuning screen brightness with PowerShell
When I work in a low-light environment I like to have fine-grained control over the brightness of my monitor. When I change the brightness using the special function keys on my keyboard, it changes in steps of 10%! That’s a lot. PowerShell to the rescue!
Generate XML with attributes using PowerShell
Today I discovered that generating XML with PowerShell isn’t as straight forward as I had hoped. I started off with a CSV that I had to convert to XML. Fortunately PowerShell is very good when it comes to CSV. It was the parsing of the object to XML-attributes that proved the most challenging part.
Sorting a Dictionary on a List of Keys
I can almost hear you thinking: “What super-weird problem are you trying to solve!?” Well… it is kind of an abstract one! Imagine you have a dictionary of objects and a separate list of keys in a certain order. Now suppose you want an ordered dictionary based on the list of keys.
Building an updatable Slack message
Slack is fully awesome. At wehkamp we use it for our internal communication and as a tool for our DevOps. The Slack API allows us to build even more advanced integrations. In this blog I’ll explore how to use the API to create powerfull progress indicators by updating a Slack message.
Dependency injection (with IOptions) in Console Apps in .NET Core
When you are used to building web applications, you kind of get hooked to the ease of Dependency Injection (DI) and the way settings can be specified in a JSON file and accessed through DI (IOptions
Cleaning up the default Hubot Slack installation
If you set up a new Hubot using the Slack Developer Kit for Hubot you’ll get an awesome bot, but with a lot of useless stuff in it. In this blog I’ll outline all the things that can be safely cleaned up. The scripts can run on both Powershell (Windows) and Bash (Linux/Mac).