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
<# | |
Converts an SXA search results API URL into the raw query sent to the provider | |
Example: | |
ConvertFrom-SxaSearchUrl (Read-Host "URL (eg. http://localhost/sxa/search/results?q=...)") | Format-List | |
#> | |
function ConvertFrom-SxaSearchUrl | |
{ | |
param( |
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
/* | |
Paste this into the dev tools console on sitecore/admin/pipelines.aspx for a summary of pipeline execution time per request | |
*/ | |
(function() { | |
function pipelinesPerRequest() { | |
const pipelines = Array.from(document.querySelectorAll('.groupheader')).map(el => ({ | |
pipeline: el.querySelector("*[pln-name]").innerText, | |
executions: parseInt(el.querySelector('*[title="#Executions"]').innerText, 10), | |
wallTime: parseInt(el.querySelector('*[title="Wall Time"]').innerText.replace(/[^\d\.]/g, ''), 10) | |
})) |
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( | |
[string]$Token = (Read-Host "Enter xdbtokenbytes_s value") | |
) | |
$bytes = [Convert]::FromBase64String($Token) | |
$ms = [System.IO.MemoryStream]::new($bytes, 0, $bytes.Length) | |
$bf = [System.Runtime.Serialization.Formatters.Binary.BinaryFormatter]::new() | |
$dict = $bf.Deserialize($ms); | |
Write-Output $dict |
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
Set-StrictMode -Version Latest | |
$ErrorActionPreference = "Stop" | |
function Enable-IISAssemblyDebugging | |
{ | |
param( | |
[string]$Path = ".", | |
[string]$Filter = "*.dll" | |
) |
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
<# | |
.SYNOPSIS | |
Connect to an Azure VM via RDP, starting it if it is not already running | |
.DESCRIPTION | |
VM credentials are cached to Credential Manager and won't be required after the first connect | |
.PARAMETER Subscription | |
The Azure Subscription that contains the VMS | |
.PARAMETER ResourceGroupName |
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
/** | |
* Types for the version of Web NFC available in Chrome for Android | |
* | |
* The spec is similar to, but does not exactly match https://w3c.github.io/web-nfc/releases/20151112/ | |
*/ | |
declare global { | |
interface Navigator { | |
nfc: WebNFC | |
} |
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
## Nuget v2 URL for the target platform, and the target marketing version | |
$SitecoreNuget = "https://sitecore.myget.org/F/sc-platform-9-1/api/v2" | |
$TargetVersion = "9.1.0" | |
## Nuget URL to retrieve package metadata, including dependencies | |
$MetaPackage = "$SitecoreNuget/Packages(Id='Sitecore.Experience.Platform',Version='$TargetVersion')" | |
## Retrieve the package metadata from nuget (no nice way of doing this via CLI) | |
$PackageMetadata = [xml](Invoke-WebRequest $MetaPackage).Content |
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
<# | |
**Prototype** | |
Updates the properties of one or more Sitecore Commerce policies in a policy set or environment json file. | |
# Patch all policies from another file | |
Patch-SitecoreCommercePolicySet -Path "path\to\policy.json" -SourcePath "path\to\source.json" | |
# Patch a specific policy from another file | |
Patch-SitecoreCommercePolicySet -Path "path\to\policy.json" -SourcePath "path\to\source.json" -PolicyType "Fully.Qualified.Type, With.Assembly.But.Spaces.Are.Ignored" |
NewerOlder