Skip to content

Instantly share code, notes, and snippets.

{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"palette": {
"black": "#262B44",
"blue": "#4B95E9",
"green": "#59C9A5",
"orange": "#F07623",
"red": "#D81E5B",
"white": "#E0DEF4",
"yellow": "#F3AE35"
@Matthew-Wise
Matthew-Wise / Program.cs
Created July 19, 2022 14:10
Umbraco 10 Application insights with Serilog sink
using Microsoft.ApplicationInsights.Extensibility;
using Serilog;
public class Program
{
public static void Main(string[] args)
=> CreateHostBuilder(args)
.Build()
.Run();
@Matthew-Wise
Matthew-Wise / BlockPreviewApiController.cs
Last active July 2, 2022 19:50
Block Previews - using ViewComponents
/*
*
* This uses https://github.com/dawoe/24-days-block-list-article/blob/develop/24Days.Core/Controllers/BlockPreviewApiController.cs
* as a base to follow all I did was change it from Partial views to ViewComponents. Yet to check if I can register the ViewComponentHelper instead of the cast.
* You will also need the App_Plugins from Dave's repo.
*/
using System;
using System.Globalization;
using System.IO;
using System.Linq;
@Matthew-Wise
Matthew-Wise / HomePageController.cs
Last active November 8, 2021 17:38
Umbraco v9 RenderMvcController replacement options
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.ViewEngines;
using Microsoft.Extensions.Logging;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Web;
using Umbraco.Cms.Web.Common.Controllers;
using Umbraco.Cms.Web.Common.PublishedModels;
@Matthew-Wise
Matthew-Wise / ContentEvents.cs
Created July 6, 2018 13:46
Umbraco Multinode picker2 UDI's to GUID for examine
public class ContentPublishEvents : IApplicationEventHandler
{
public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
}
public void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
}