This file contains 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
document.querySelector('#policy_document .ace_scroller').innerText |
This file contains 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 | |
Copies all EC2 Security Group rules from one IP range to one or more other ranges, optionally removing the original IP's rules | |
.DESCRIPTION | |
Copies all EC2 Security Group rules from one IP range to one or more other ranges, optionally removing the original IP's rules | |
.PARAMETER Region | |
The AWS Region to apply the changes to | |
.PARAMETER CurrentIpRange | |
The IP Address or CIDR Range that should be used as a template when copying rules | |
.PARAMETER NewIpRanges |
This file contains 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
# Resets the password for the default LXSS / WSL bash user, based on https://askubuntu.com/a/808425/697555 | |
$lxssUsername = (Get-ItemProperty HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss).DefaultUsername | |
lxrun /setdefaultuser root | |
bash -c "passwd $lxssUsername" | |
lxrun /setdefaultuser $lxssUsername |
This file contains 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
Windows Registry Editor Version 5.00 | |
[HKEY_CURRENT_USER\Console] | |
"ColorTable00"=dword:000c0c0c | |
"ColorTable01"=dword:00da3700 | |
"ColorTable02"=dword:000ea113 | |
"ColorTable03"=dword:00dd963a | |
"ColorTable04"=dword:001f0fc5 | |
"ColorTable05"=dword:00981788 | |
"ColorTable06"=dword:00009cc1 |
This file contains 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 | |
Validates a Sitecore "Assembly list" (from dev.sitecore.net) against a folder | |
.PARAMETER AssemblyList | |
The assembly list text file downloaded from dev.sitecore.net | |
.PARAMETER AssemblyFolder | |
The folder containing the Sitecore assemblies to validate | |
.PARAMETER CheckFileVersion | |
If set, also verifies the file version. Requires loading the assembly, so should be invoked in an isolated powershell environment | |
.NOTES |
This file contains 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
# Updates from a specific version to avoid conflicting names ("Sitecore.Framework", "Sitecore.Ship", etc) | |
$SourceVersion = "9.0.171002" | |
# Does late filtering to avoid redundant upgrades for packages that have already been upgrades as dependencies. Big time saver | |
Get-Package | ` | |
Where-Object { $_.Id -like "Sitecore.*" } | ` | |
Foreach-Object { | |
$id = $_.Id | |
if ((Get-Package -ProjectName $_.ProjectName) | ?{ $_.Id -eq $id -and $_.Version -eq $SourceVersion}) { | |
Update-Package -Id $_.Id -ProjectName $_.ProjectName -Version HighestPatch # Use HighestMinor for a full point release |
This file contains 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 Invoke-SitecoreCommerceBootstrap { | |
param( | |
[string]$Username = "sitecore\admin", | |
[string]$Password = "b", | |
[string]$IdentityServer = "https://localhost:5050", | |
[string]$OpsServer = "https://localhost:5015" | |
) | |
$ErrorActionPreference = "Stop" |
This file contains 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
/** | |
This block is designed to assist with diagnosing data/pipeline issues within Sitecore | |
Example: | |
services.Sitecore().Pipelines(config => config | |
.ConfigurePipeline<ICalculateSellableItemSellPricePipeline>(builder => builder | |
.Add<DiagnosticBlock<SellableItem>>("Before CalculateSellableItemListPriceBlock").Before<CalculateSellableItemSellPriceBlock>(), | |
order: 1001 | |
) |
This file contains 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" |