Skip to content

Instantly share code, notes, and snippets.

View DanielToft's full-sized avatar

Daniel Toft DanielToft

View GitHub Profile
using System;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Web.Http.Filters;
using Newtonsoft.Json.Serialization;
namespace Filters
{
[AttributeUsage(AttributeTargets.All)]
public class CamelCasingFilterAttribute : ActionFilterAttribute
@DanielToft
DanielToft / index.html
Created June 16, 2015 11:56
Link Picker
<div class="umb-editor umb-relatedlinks" ng-controller="noerd.Lightyears.LinkController">
<table class="table table-striped">
<thead>
<tr>
<td>Caption</td>
<td>Link</td>
<td>New window</td>
</tr>
</thead>
<tbody>
@DanielToft
DanielToft / gist:fd4f92fdeb57230e84e2
Created May 20, 2015 10:45
Umbraco Backoffice ApiController
[CamelCasingFilter]
[RoutePrefix("umbraco/backoffice/api/test")]
[IsBackOffice]
[UmbracoAuthorize]
public class UmbracoTestController : ApiController
{
}
public class FriendlyUrlService
{
// -------------------------------------------------------------------------
// Fields
// -------------------------------------------------------------------------
private static readonly IDictionary<string, string> _friendlyCharMap;
// -------------------------------------------------------------------------
// Cosntructor