Skip to content

Instantly share code, notes, and snippets.

View thecodefish's full-sized avatar

Simon Fisher thecodefish

View GitHub Profile
@thecodefish
thecodefish / controller.ts
Created September 27, 2017 21:02
AngularJS component example for loading GrapesJS editor
class MyController {
editor: any;
grapesJsConfig: {
//whatever
}
constructor(private readonly $scope: ng.IScope) {}
@thecodefish
thecodefish / Umbraco-SQL
Created May 20, 2015 20:21
Umbraco helper SQL script - continue adding property to document type after the UI times out
/* Originally based on script from https://our.umbraco.org/projects/developer-tools/sql-scripts */
/* Use to create missing PropertyData entries if the Umbraco UI gives a timeout error when trying
* to add a new property to an existing document type */
Declare @ContentTypeAlias nvarchar(255), @PropertyTypeAlias nvarchar(255)
Set @ContentTypeAlias = 'nodeTypeAlias'
Set @PropertyTypeAlias = 'propertyTypeAlias'
Declare @ContentTypeId int, @PropertyTypeId int
@thecodefish
thecodefish / ApplicationEventHandler.cs
Last active July 3, 2017 02:40
Code classes/snippets required for setting up Castle.Windsor integration with Umbraco 7.x
using System.Web.Http;
using System.Web.Http.Dispatcher;
using Umbraco.Core;
using Umbraco.Web.Mvc;
namespace MySite.CastleConfiguration
{
public class ApplicationEventHandler : IApplicationEventHandler
{
public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
@thecodefish
thecodefish / AzureFileSystemProvider.cs
Created June 16, 2014 06:07
Azure Blob Storage FileSystemProvider for Umbraco
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Blob;
using Umbraco.Core.IO;