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
Set-StrictMode -Version Latest | |
$ErrorActionPreference = "Stop" | |
function Enable-IISAssemblyDebugging | |
{ | |
param( | |
[string]$Path = ".", | |
[string]$Filter = "*.dll" | |
) |
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
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 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
/* | |
Copyright (C) 2013 Richard Szalay | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation | |
files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, | |
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the | |
Software is furnished to do so. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | |
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
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
#requires -Version 2.0 | |
#region Exported Cmdlets | |
<# | |
.SYNOPSIS | |
Creates a self-signed certificate and copies it into the trusted store. | |
.DESCRIPTION | |
Creates a self-signed certificate and copies it into the trusted store. |
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
<# | |
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 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 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 | |
} |
NewerOlder