Skip to content

Instantly share code, notes, and snippets.

View marcduiker's full-sized avatar
/-/

Marc Duiker marcduiker

/-/
View GitHub Profile
@marcduiker
marcduiker / endesga32-palette.omp.json
Last active April 9, 2021 23:12
Oh My Posh 3 Theme
{
// Created by https://twitter.com/marcduiker.
// Colors based on ENDESGA 32 palette: https://lospec.com/palette-list/endesga-32
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
"segments": [
@marcduiker
marcduiker / FunctionAppHealthCheck.cs
Last active March 26, 2021 08:36
Custom Application Insights Availability Metrics for a Function App
using System;
using System.Threading.Tasks;
using Azure.HealthCheck;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.Extensions.Logging;
namespace FunctionApp.Application.HealthCheck
{
public class FunctionAppHealthCheck : HealthCheckBase
{
@marcduiker
marcduiker / MyUserManual.md
Last active January 9, 2023 08:09
My User Manual

User manual for working with me*

Conditions I like to work in

  • Usually a quiet space with little distraction.
  • A space with enough (sun)light (I use light themes in my IDE from time to time! 😱).
  • Working from home works well for me, since I have all the space and equipment I need, and I can balance it with family life.

The times and hours I like to work

@marcduiker
marcduiker / ILogger Mocking with Strict behaviour.md
Last active January 19, 2021 09:35
Mocking ILogger for Azure Functions

To mock the behavior of ILogger in Azure Functions with MockBehavior.Strict (using Moq) you can use the following mock setup:

var loggerMock = new Mock<ILogger>(MockBehavior.Strict);
    loggerMock.Setup(
        log => log.Log(
            LogLevel.Error,
            It.IsAny<EventId>(), 
            It.IsAny<It.IsAnyType>(),
            It.IsAny<Exception>(),
@marcduiker
marcduiker / prerequisites.md
Created November 23, 2020 21:18
VSLive2020 Azure Fucntions Workshop Prerequisites

VSLive 2020 Azure Functions Workshop Prerequisites

Frameworks & Tooling 🧰

In order to complete the the lessons you need to install the following:

Prerequisite Description
.NET Core 3.1 The .NET runtime and SDK.
VSCode or VS2019 VSCode is great for cross platform. VS2019 is best for Windows only.
@marcduiker
marcduiker / vscode_extensions.md
Last active November 19, 2020 18:17
My fav VSCode extensions! 👨‍💻

I ❤ VSCode and its extensibility. You can browse for available extensions from within VSCode (CTRL+SHIFT+X) or via the marketplace.

Besides the regular C# and Azure(Functions) extensions I use, these are my favorite VSCode extensions:

@marcduiker
marcduiker / FeatureManagementConfig.cs
Last active November 19, 2020 15:49
AppConfig Feature Management with Azure Functions
namespace FunctionAppWithFeatureManagement
{
public static class FeatureManagementConfig
{
public static string ConnectionStringSetting => "FeatureConfigConnectionString";
public static string FeaturePrefix => "FuncApp-*";
public static string FuncAppFeatureA => "FuncApp-FeatureA";
}
}
@marcduiker
marcduiker / persistence-in-serverless-apps.md
Last active December 20, 2020 21:59
Links for Persistence in Serverless Applications
@marcduiker
marcduiker / vslive_azure_functions_workshop.md
Last active November 5, 2020 20:34
VS Live Functions Workshop

VSLive Azure Functions Workshop 2020

This workshop will start with the basics of serverless architectures and explain how Azure Functions play a part in building serverless solutions.

You will learn how to develop Azure Functions using .NET Core and Visual Studio 2019.

Next, you are going to build and deploy these with Azure DevOps using CI/CD.

Also covered is the lifecycle management and operations of serverless solutions.