Skip to content

Instantly share code, notes, and snippets.

View daniiiol's full-sized avatar

Daniel Scherrer daniiiol

View GitHub Profile
@akshaysura
akshaysura / HabitatSolutionScript.ps1
Created January 21, 2017 23:34
Create a Sitecore Helix solution from scratch using PowerShell
#paths to the project templates on your system
$global:classTemplate = "D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplatesCache\CSharp\Windows Root\Windows\1033\ClassLibrary\csClassLibrary.vstemplate"
$global:webTemplate = "D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplatesCache\CSharp\Web\1033\WebApplicationProject40\EmptyWebApplicationProject40.vstemplate"
#variable used to store the path for the empty Habitat folder
$global:helixPath =""
#empty variable used to store the solution name
$global:solutionName = ""
@kamsar
kamsar / Performance.Dev.config
Last active August 17, 2021 16:04
SItecore 8.0/8.1/8.2 Performance Config
<!--
A set of performance optimizations for development that vastly increase application startup time.
Should not be used in production, as they largely disable forensic diagnostics that you'd want there over fast startup time after a compile.
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<hooks>
<hook type="Sitecore.Diagnostics.HealthMonitorHook, Sitecore.Kernel">
<patch:delete />
@hermanussen
hermanussen / SitecoreChecks.aspx
Created October 3, 2015 14:37
This is a simple page that can be dropped into a Sitecore CM or CD server so you can easily monitor its health.
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Diagnostics" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="Sitecore.ContentSearch" %>
<%@ Import Namespace="Sitecore.Data" %>
<%@ Import Namespace="Sitecore.Data.Items" %>
<script runat="server">
#region Configure actual checks here
@lowedown
lowedown / AssociateCampaignToVisit.cs
Created July 11, 2014 07:25
Hook for the triggerCampaign pipeline to always associate a campaign to a visit.
public class AssociateCampaignToVisit : TriggerCampaignProcessor
{
public override void Process(TriggerCampaignArgs args)
{
Assert.ArgumentNotNull((object)args, "args");
// Always associate the campaign to the current visit when triggered
Sitecore.Analytics.Tracker.CurrentVisit.CampaignId = args.Definition.ID.ToGuid();
}
}
@lowedown
lowedown / ViewJobs.aspx
Last active April 11, 2016 20:38
Sitecore Admin Page to show currently running Jobs
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Import Namespace="Sitecore.Jobs" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Running Sitecore Background Jobs</title>
<meta http-equiv="refresh" content="3" />
@lowedown
lowedown / ApplySendingSettings.cs
Last active August 29, 2015 14:01
Globally override Web Forms for Marketers Email Sending settings.
using System;
using System.Net;
using Sitecore.Form.Core.Pipelines.ProcessMessage;
namespace MyProject.Forms
{
/// <summary>
/// Overrides Web forms for marketers mail settings through global configuration options.
/// </summary>
public class ApplySendingSettings