Skip to content

Instantly share code, notes, and snippets.

View deanebarker's full-sized avatar

Deane Barker deanebarker

View GitHub Profile
@deanebarker
deanebarker / CommentForm.html
Last active September 12, 2017 19:46
The simplest comment implementation I could come up with using Episerver Social with the "Alloy" demo site
<form method="post" action="/social/comments/add" id="commentForm">
<input type="hidden" name="pageId" value="@Model.CurrentPage.ContentGuid"/>
<input type="text" name="author" placeholder="Your name..."/>
<textarea name="body" id="commentBody" placeholder="Your comment..."></textarea>
<br/>
<input type="submit" id="commentSubmitButton" disabled="disabled" style="opacity: 0.5;" value="Submit" />
</form>
<div id="commentList">
Loading comments...
@deanebarker
deanebarker / AirtableGetObjects.cs
Last active April 13, 2022 22:27
A helper class to create a list of populated objects from an Airtable API call
/*
This is very alpha. It's just an idea I was screwing around with in LINQPad.
Airtable might have a full-blown .NET API, for all I know.
Deane
July 19, 2017
*/
@deanebarker
deanebarker / WyamBuilder.cs
Last active January 17, 2017 20:08
An example of configuing Wyam to build from an HttpHandler.
using System;
using System.Configuration;
using System.Diagnostics;
using System.Web;
using Wyam.Core.Execution;
using Wyam.Core.Modules.Contents;
using Wyam.Core.Modules.Control;
using Wyam.Core.Modules.IO;
using Wyam.Core.Modules.Metadata;
using Wyam.Markdown;
@deanebarker
deanebarker / WebhookController.cs
Created December 27, 2016 22:47
Contentful Database Synchronization Controller
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Linq;
using System.Net;
using System.Web.Http;
// Note: for this to work, you need to insert this line in the Application_Start event of your global.asax