Skip to content

Instantly share code, notes, and snippets.

View marcduiker's full-sized avatar
/-/

Marc Duiker marcduiker

/-/
View GitHub Profile
@marcduiker
marcduiker / weekly-pixel-art-challenge.md
Last active June 12, 2021 19:34
Weekly Pixel Art Challenge
@marcduiker
marcduiker / windows_terminal_setup.md
Last active September 19, 2021 04:30
Windows Termimal Style Setup

Prettify Windows Terminal

  • Download and install CasKaydiaCove NF from https://www.nerdfonts.com/font-downloads
  • Run Install-Module -Name Terminal-Icons -Repository PSGallery
  • Run Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser
  • Run Install-Module -Name oh-my-posh -Scope CurrentUser -AllowPrerelease
  • Update $PROFILE with content shown below.
  • Update WindowsTerminal settings to use the CasKaydiaCove NF font.

$PROFILE content

@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";
}
}