This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Parlot.Fluent; | |
using static Parlot.Fluent.Parsers; | |
using System.Collections.Generic; | |
using System; | |
using System.Linq; | |
/* | |
This class allows you to query and manipulate a set of numbers using a simple language. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
This will show a UI "drawer" that pops out from the right side of the screen, with a dropshadow and overlay on the rest of the window. | |
The drawer will auto-focus on the first input field. | |
A close button will automatically be placed in the top left corner. (Also, you can close by clicking anywhere else on the page.) | |
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ServiceConfiguration(typeof(IPropertyConverterProvider), Lifecycle = ServiceInstanceScope.Singleton)] | |
public class CustomPropertyConverterProvider : IPropertyConverterProvider | |
{ | |
public int SortOrder => 200; | |
public IPropertyConverter Resolve(PropertyData propertyData) | |
{ | |
if (propertyData is PropertyContentArea) | |
{ | |
return new PersonalizedContentAreaPropertyConverter(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.ApplicationInsights.Extensibility; | |
using Microsoft.ApplicationInsights.Extensibility.Implementation; | |
public class Startup | |
{ | |
public void Configure(TelemetryConfiguration telemetryConfiguration) | |
{ | |
telemetryConfiguration.DisableTelemetry = true; | |
TelemetryDebugWriter.IsTracingDisabled = true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using EPiServer.ServiceLocation; | |
using Microsoft.AspNetCore.Mvc; | |
using Optimizely.ContentGraph.Cms.Core.Internal; | |
namespace DeaneBarker.Optimizely.Cms | |
{ | |
[Route("component")] | |
public class ComponentController : Controller | |
{ | |
private const string KEY_TOKEN = "@key"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
<table-of-contents title="Contents" source=".article" selector="h2,h3"></table-of-contents> | |
* "title" will be placed in a HEADER tag as the first child | |
* "source" default to the BODY tag | |
* "selector" defaults to "h2" | |
OR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
<relative-date datetime="1971-09-03" prefix="Posted" suffix="ago"/> | |
Outputs: | |
<relative-date>Posted 52 years ago</relative-date> | |
*? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moved to a permanent repo here: https://github.com/deanebarker/Nemmet |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file is just for naming |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
// The text to test it on | |
var text = new WorkingText("Annie1aa2"); | |
// The parser: hits on "Deane" or "Annie" following by a number, then two letters, then another number | |
var parser = new Sequence( | |
new Any( | |
new TextParser("Deane"), | |
new TextParser("Annie") |
NewerOlder