Skip to content

Instantly share code, notes, and snippets.

View danlister's full-sized avatar

Dan Lister danlister

View GitHub Profile
@danlister
danlister / azure-pipelines.yaml
Last active May 5, 2021 08:41
Multi-Stage Pipeline (Terraform and .NET Core App)
trigger: none
pr:
branches:
include:
- master
variables:
- name: COMPONENT_NAME
value: app
CREATE CLUSTERED INDEX umbracoUserLogins_Index ON umbracoUserLogins (contextID)
using Examine;
using Umbraco.Core;
namespace Application.Events
{
public class CustomApplicationEvent : ApplicationEventHandler
{
public CustomApplicationEvent()
{
ExamineManager.Instance.IndexProviderCollection["CustomIndexer"].GatheringNodeData
@danlister
danlister / does-import.css
Last active August 29, 2015 14:10
ClientDependency Framework Google Fonts Hack
@import url("http://fonts.googleapis.com/css?family=Roboto:400,700&.css");
// The below action works correctly when a template exists
// for the current page. When a template has not been selected
// or does not exist, the ambiguous action method
// exception occurs.
//
// I'm starting think this is correct behaviour because
// MyPageController has an action called Index and so does
// RenderMvcController. Therefore, having duplicate routes.
//
// What I'm not quite certain about is why the exception
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Web.Script.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Umbraco.Core;
using Umbraco.Core.Events;
using Umbraco.Core.Models;
@danlister
danlister / 4.11.8.sql
Last active May 22, 2018 18:47
Retrieve a list of Umbraco Documents which have pending changes
DECLARE @NodeId INT
DECLARE my_cursor CURSOR local static read_only forward_only FOR
SELECT DISTINCT nodeid
FROM cmsdocument
OPEN my_cursor
FETCH next FROM my_cursor INTO @NodeId
WHILE @@FETCH_STATUS = 0
@{
<ul>
@foreach (var hole in holes)
{
<li>
Tee: @hole.Name
<ul>
<li>Par: @hole.Par</li>
<li>Stroke Index: @hole.StrokeIndex</li>
<li>Distance: @hole.Distance yards</li>
var holes = Model.Content.GetPropertyValue<AgeBase.GolfHoleEditor.Models.GolfTees>("alias");
Install-Package AgeBase.GolfHoleEditor