This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Test-AzDOPipeline { | |
<# | |
.SYNOPSIS | |
Tests an Azure Devops Pipeline YAML configuration | |
.DESCRIPTION | |
This can be used to validate an Azure Devops pipeline configuration within a particular pipeline project. | |
#> | |
param ( | |
#Your Azure Devops Organization Name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function IISReset { | |
[CmdletBinding(SupportsShouldProcess = $true)] | |
Param | |
( | |
[string]$Reason, | |
[int]$TryNumber = 0, | |
[switch]$Force | |
) | |
if ($Force -or $PSCmdlet.ShouldProcess("IIS", $Reason)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
$solrVersion = "6.6.2", | |
$installFolder = "c:\solr", | |
$solrPort = "8983", | |
$solrHost = "solr", | |
$solrSSL = $true, | |
$nssmVersion = "2.24", | |
$JREVersion = "9.0.1" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Sitecore.Pipelines.RenderField; | |
namespace MyProject.CMS.Custom.Pipelines.RenderField | |
{ | |
public class ShowTitleWhenBlank | |
{ | |
public void Process(RenderFieldArgs args) | |
{ | |
args.RenderParameters["show-title-when-blank"] = "true"; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$tempFolder = [Sitecore.Update.Utils.FileUtils]::InstallationHistoryRoot | |
$historyFolder = [Sitecore.MainUtil]::MapPath($tempFolder) | |
#get the latest update folder | |
$latestUpdate = Get-ChildItem -Path $historyFolder | Sort-Object LastAccessTime -Descending | Select-Object -First 1 | |
Write-Host $latestUpdate.FullName | |
[Sitecore.Update.Engine.PackageGenerator]::ConvertRollbackPackage( ` | |
$latestUpdate.FullName + "\rollbackPackage.rlb", ` | |
$latestUpdate.FullName + "\rollbackPackage.update") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#+ | |
public static string TitleCase(string word) | |
{ | |
string newWord = System.Text.RegularExpressions.Regex.Replace(word, "([a-z](?=[A-Z])|[A-Z](?=[A-Z][a-z]))", "$1+"); | |
newWord = System.Globalization.CultureInfo.InvariantCulture.TextInfo.ToTitleCase(newWord); | |
newWord = newWord.Replace("+", ""); | |
return newWord; | |
} | |
public static string CamelCase(string word) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Specialized; | |
using System.Web; | |
using Sitecore.Data.Items; | |
using Sitecore.Diagnostics; | |
using Sitecore.Links; | |
using Sitecore.Web; | |
namespace Sitecore.Custom.Links |