Skip to content

Instantly share code, notes, and snippets.

dsolovay / Get-SitecoreReleaseNotes
Last active Aug 15, 2022
Download Sitecore release notes to hash table
View Get-SitecoreReleaseNotes
function Get-SitecoreReleaseNotes()
$links = (invoke-webrequest
$versions = $links |? {$_.innerText -like 'Sitecore Experience Platform*' -and $_.InnerText -notlike '*and below*'} #
$versionlinks = @{}
$versions |% { $versionLinks.Add($_.innerHtml, $_.href)}
$releaseNotes = @{}
$versionLinks.Keys |%{
$releaseNotesUrl = "" + ($versionLinks[$_]).Trim(".aspx") + "/Release%20Notes"
Write-Verbose $releaseNotesUrl
View Searchtester.aspx
<%@ Page %>
<%@ Import namespace="Sitecore.ContentSearch" %>
<%@ Import namespace="Sitecore.ContentSearch.SearchTypes" %>
<form runat=server>
<!-- <asp:textbox runat=server id=tb1 /> -->
<asp:button runat=server text=Click onclick=DoSearch />
<script runat=server>
dsolovay / CustomCampaignCreator.config
Created Dec 21, 2021
How to modify Campaign Creator to not embed IDs in campaign names
View CustomCampaignCreator.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="" xmlns:set="" xmlns:env="">
<sitecore >
<configurator type="CustomCampaignRepository.ServicesConfigurator, CustomCampaignRepository" />
dsolovay / ConfigureSitecore.cs
Last active Dec 10, 2021
Code samples for Part 2 of Sustainsys.SAML2 Sitecore Identity plugin
View ConfigureSitecore.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Claims;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Threading;
dsolovay / CacheFixture.cs
Last active Oct 7, 2021
Illustrates zero-friction TDD ideas, use of Sitecore base classes, and tuple deconstructors
View CacheFixture.cs
using NSubstitute;
using Sitecore.Abstractions;
namespace UnitTestingDemo
internal static class CacheFixture
public static (CustomCacheFactory, BaseCacheManager, BaseSettings) CreateCache()
BaseCacheManager cacheManager = Substitute.For<BaseCacheManager>();
dsolovay / parameters.xml
Created Sep 19, 2021
Simple WebDeploy parameter configuration
View parameters.xml
<?xml version="1.0" encoding="utf-8" ?>
<parameter name="Application Ribbon Home Label"
description="Label that appears in ribbon"
defaultvalue="Application name" >
<parameterEntry kind="TextFile" scope="_Layout.cshtml" match="Application name" />
dsolovay / ConfigureSitecore.cs
Last active Dec 8, 2021
Sitecore Identity to Sustainsys Plugin
View ConfigureSitecore.cs
using IdentityServer4;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.DependencyInjection;
using Sustainsys.Saml2;
using Sustainsys.Saml2.Configuration;
using Sustainsys.Saml2.Metadata;
using Sustainsys.Saml2.WebSso;
namespace SitecoreIdentitySamlDemo
dsolovay / Make_IdentityServer.ps1
Last active Sep 14, 2021
SIF for creating a duplicate ID server (for dev testing, plugin development, etc.)
View Make_IdentityServer.ps1
# A subset of XP0_SingleDeveloper.ps1 for creating duplicate ID servers for plugin development.
# Note values marked "UPDATE FROM EXISTING" should be updated based on a working starting point ID server (installed using SIF or the
# graphical installer).
# The Prefix that will be used on SOLR, Website and Database instances.
# The root folder with the license file and WDP files.
$SCInstallRoot = "C:\ResourceFiles"
dsolovay / ExtractGuids.ps1
Last active Oct 27, 2021
Get IDs from Sitecore 10.1 Upgrade scripts
View ExtractGuids.ps1
# Input file
$output = Get-Content $InputFile | % {[Regex]::match($_, "^.{36}(.{36})").Groups[1].Value}
dsolovay / ContactInfo.aspx
Created Nov 13, 2020
Get xConnect Contact ID (for use in Experience Profile, etc.)
View ContactInfo.aspx
<%@ Page Language="C#" AutoEventWireup="true" %>
<!DOCTYPE html>
<html xmlns="">
<head runat="server">
<title>Session Info</title>
<h1>Session Info</h1>