Skip to content

Instantly share code, notes, and snippets.

@IvanLieckens
IvanLieckens / Deploy-SCCH.ps1
Last active March 7, 2022 13:39
Deploy SCCH Connector to Azure Web App using MSDeploy and the WDP Package from dev.sitecore.net
[CmdletBinding(DefaultParameterSetName = "no-arguments")]
param(
[Parameter(HelpMessage = "Name of the resource group in Azure to target.")]
[string]$ResourceGroupName,
[Parameter(HelpMessage = "Name of the web app in Azure to target.")]
[string]$WebAppName,
[Parameter(HelpMessage = "Path to the WDP to deploy to the target.")]
[string]$WdpPackagePath,
@IvanLieckens
IvanLieckens / Unicorn Synch Online.ps1
Created June 25, 2021 06:34
Custom Release Pipeline Steps
Import-Module .\Unicorn.psm1
function Wait-UnicornOnline
{
[CmdletBinding()]
param (
[Parameter(Mandatory)]
[string]$Uri,
[int]$MaxAttempts = 10
)
@IvanLieckens
IvanLieckens / Prerequisites-Offline.ps1
Created November 4, 2020 08:32
SIF Offline Prerequisites 9.3
Import-Module -Name SitecoreInstallFramework -Force -RequiredVersion 2.2.0
# Installer files and packages
$VisualCPP2015x64 = Resolve-Path "..\..\Packages\vc_redist.x64.exe"
$SqlServerPSModulePackageFolder = Resolve-Path "..\..\Packages\"
$SharedManagementObjectsInstallerx86 = Resolve-Path "..\..\Packages\SharedManagementObjects_x86.msi"
$SharedManagementObjectsInstallerx64 = Resolve-Path "..\..\Packages\SharedManagementObjects_x64.msi"
$WebDeployInstaller = Resolve-Path "..\..\Packages\WebDeploy_amd64_en-US.msi"
$URLRewriteInstaller = Resolve-Path "..\..\Packages\rewrite_amd64_en-US.msi"
$SQLClrTypesx86 = Resolve-Path "..\..\Packages\SQLSysClrTypes_x86.msi"
@IvanLieckens
IvanLieckens / ImportLanguage.aspx
Created October 22, 2020 08:57
SIF: Installing Language Pack
<%@ page language="C#" autoeventwireup="true" inherits="Sitecore.sitecore.admin.AdminPage" %>
<%@ import namespace="Sitecore.Abstractions" %>
<%@ import namespace="Sitecore.Jobs" %>
<%@ import namespace="Sitecore.Shell.Applications.Globalization.ImportLanguage" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
CheckSecurity(true);
@IvanLieckens
IvanLieckens / InstallSolr.ps1
Created August 12, 2020 10:03
PowerShell Installing OJDK+SOLR (Kudos to Mark Cassidy for initial version)
Param(
$installFolder = "c:\",
$solrPort = "8983",
$solrHost = "solr881",
$solrSSL = $true,
$downloadFolder = "$env:Temp"
)
$solrVersion = "8.1.1"
$solrName = "solr-$solrVersion"
@IvanLieckens
IvanLieckens / FilteredUnzip.cs
Created April 16, 2020 08:13
Filtered Unzip Task for MSBuild based on standard Unzip task (https://github.com/microsoft/msbuild/issues/5169)
using System;
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Resources;
using System.Text.RegularExpressions;
using System.Threading;
using Microsoft.Build.Framework;
@IvanLieckens
IvanLieckens / Sync-Theme.ps1
Last active September 17, 2020 09:22
Powershell to sync SXA themes with TDS serialized items
Param(
[string]$ThemePath = "sitecore\media library\Themes\Project\Shared\Project",
[string]$FilesPath = ".\-\media\Themes\Project\Shared\Project",
[string]$TdsPath = "..\Project\TDS.Master",
[string]$TdsProject = "TDS.Master.scproj",
[string]$TypeLoadPath = ".\Binaries",
[string]$UpdateFile = "",
[string]$DeleteFile = "",
[string]$ItemId = ""
)
@IvanLieckens
IvanLieckens / EXM.config
Created September 25, 2019 06:23
Sitecore EXM rewriting of HTML tables to better support Experience Editor while retaining original output
<?xml version="1.0"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentManagement">
<pipelines>
<mvc.renderRendering>
<processor type="Project.EXM.Pipelines.RenderRendering.ExmTableRewriter, Project.EXM"/>
</mvc.renderRendering>
</pipelines>
</sitecore>
</configuration>
@IvanLieckens
IvanLieckens / RenderingParametersExtensions.cs
Created August 28, 2019 13:13
Handy extension methods for RenderingParameters in Sitecore MVC
using Sitecore.Data;
using Sitecore.Data.Fields;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
using Sitecore.Mvc.Presentation;
using Sitecore.Resources.Media;
namespace Foundation.Extensions
{
public static class RenderingParametersExtensions
@IvanLieckens
IvanLieckens / disconnected-mode-proxy.js
Created June 5, 2019 09:39
JSS Disconnected mode GraphQL (Integrated + Connected) - Proof of Concept
/*
When the app runs in disconnected mode, and Sitecore is not present, we need to give
the app copies of the Sitecore APIs it depends on (layout service, dictionary service, content service)
to talk to so that the app can run using the locally defined disconnected data.
This is accomplished by spinning up a small Express server that mocks the APIs, and then
telling the dev server to proxy requests to the API paths to this express instance.
*/
// these environment variables are necessary for Vue to allow us