Skip to content

Instantly share code, notes, and snippets.

Daniel Scherrer daniiiol

Block or report user

Report or block daniiiol

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@daniiiol
daniiiol / octopusVarsInSitecoreConfigs.json
Last active Dec 7, 2016
Replace Octopus Variables in Sitecore Configs to environment specific values
View octopusVarsInSitecoreConfigs.json
{
"Id": "ActionTemplates-64",
"Name": "Replace Octopus Vars in Sitecore Configs",
"Description": "This Script searchs through all *.config files and replaces sc.variables and Sitecore settings with the value in Octopus of the same key.",
"ActionType": "Octopus.Script",
"Version": 16,
"Properties": {
"Octopus.Action.Script.Syntax": "PowerShell",
"Octopus.Action.Script.ScriptSource": "Inline",
"Octopus.Action.RunOnServer": "false",
@daniiiol
daniiiol / agent.snippet
Last active Oct 21, 2016
Sitecore Visual Studio Snippets
View agent.snippet
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<Header>
<Title>
<!-- _locID_text="title" _locComment="" -->Agent</Title>
<Author>Daniel Scherrer</Author>
<Shortcut>sc_agent</Shortcut>
<Description>
<!-- _locID_text="description" _locComment="" -->Generates an Agent Entry</Description>
<SnippetTypes>
@daniiiol
daniiiol / Custom.ClonedItems.config
Created Oct 20, 2016
Access Rules for Cloned Items
View Custom.ClonedItems.config
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<accessRights defaultProvider="config">
<rights>
<add patch:after="*[@name='field:write']" name="field:writeClone" comment="Write right for fields." title="Field Write for Clones" modifiesData="false" />
<add patch:after="*[@name='item:write']" name="item:writeClone" comment="Write right for items." title="Write for Clones" modifiesData="false" />
</rights>
</accessRights>
@daniiiol
daniiiol / EventModel.cs
Last active Sep 26, 2016
Sitecore Client Tracker (SC 8.2)
View EventModel.cs
using System.ComponentModel.DataAnnotations;
public class EventModel
{
/// <summary>
/// Name of the page event to be registered.
/// </summary>
[Required]
public string EventName { get; set; }
/// <summary>
View SPE - Report - External Link Checker.ps1
@daniiiol
daniiiol / GlobalExceptionHandler.Config
Last active Sep 9, 2016
Catch the Sitecore MVC Exceptions before executing an application error - The Global Exception Tentacle to avoid Yellow Pages of Death
View GlobalExceptionHandler.Config
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<pipelines>
<mvc.exception>
<!--
The Global Exception Tentacle to avoid Yellow Pages of Death
If ShowExceptionsInPageEditor == true -> The system will throw an exception in the PageEditor
If ShowExceptionsInPreview == true -> The system will throw an exception in preview mode
If ShowExceptionsInDebugger == true -> The system will throw an exception in debbuger mode
-->
View nitroNet.CastleWindsor.Modules - CastleWindsorModule.cs
public static void RegisterTypes(IWindsorContainer container)
{
var rootPath = HostingEnvironment.MapPath("~/");
var basePath = PathInfo.Combine(PathInfo.Create(rootPath), PathInfo.Create(ConfigurationManager.AppSettings["NitroNet.BasePath"])).ToString();
new DefaultCastleWindsorModule(basePath).Configure(container);
}
View nitroNet.Sitecore.CastleWindsorModules - CastleWindsorConfig.cs
public static void RegisterTypes(IWindsorContainer container)
{
var rootPath = HostingEnvironment.MapPath("~/");
var basePath = PathInfo.Combine(PathInfo.Create(rootPath), PathInfo.Create(ConfigurationManager.AppSettings["NitroNet.BasePath"])).ToString();
new DefaultCastleWindsorModule(basePath).Configure(container);
new SitecoreCastleWindsorModule().Configure(container);
}
View nitroNet.UnityModules - UnityConfig.cs
/// <summary>
/// Specifies the Unity configuration for the main container.
/// </summary>
public class UnityConfig
{
#region Unity Container
private static Lazy<IUnityContainer> container = new Lazy<IUnityContainer>(() =>
{
var container = new UnityContainer();
RegisterTypes(container);
View nitroNet.UnityModules - global.asax
<%@Application Language='C#' %>
<%@ Import Namespace="NitroNet" %>
<script RunAt="server">
public void Application_Start()
{
ViewEngines.Engines.Add(DependencyResolver.Current.GetService<NitroNetViewEngine>());
}
</Script>
You can’t perform that action at this time.