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
| <configuration> | |
| <system.webServer> | |
| <handlers> | |
| <remove name="aspNetCore" /> | |
| <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /> | |
| </handlers> | |
| <aspNetCore processPath="dotnet" arguments=".\SampleNetCoreApp.dll"> | |
| <environmentVariables> | |
| <environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" /> | |
| </environmentVariables> |
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.Generic; | |
| using System.ComponentModel.DataAnnotations; | |
| namespace Ether.Validation | |
| { | |
| public static class SimpleValidator | |
| { | |
| /// <summary> | |
| /// Validate the model and return a response, which includes any validation messages and an IsValid bit. |
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
| # Use this report to export current access | |
| $users = Get-User -Filter * | Where-Object { $_.Roles.Count -gt 0 } | |
| $records = [System.Collections.ArrayList]@() | |
| foreach($user in $users) { | |
| $record = [PSCustomObject]@{ | |
| "Username" = $user.Name | |
| "Roles" = ($user.Roles | Select-Object -ExpandProperty Name) -join "," | |
| } | |
| $records.Add($record) > $null |
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
| Import-Function -Name Invoke-SqlCommand | |
| $connection = [Sitecore.Configuration.Settings]::GetConnectionString("master") | |
| $query = @" | |
| DELETE FROM [Sitecore.Masterx].[dbo].[Publishing_ActivationLock] | |
| DELETE FROM [Sitecore.Masterx].[dbo].[Publishing_Data_Params_FieldIds] | |
| DELETE FROM [Sitecore.Masterx].[dbo].[Publishing_Data_Params_Languages] | |
| DELETE FROM [Sitecore.Masterx].[dbo].[Publishing_JobManifest] | |
| DELETE FROM [Sitecore.Masterx].[dbo].[Publishing_JobMetadata] |
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 GraphQL.Types; | |
| using Sitecore.ContentSearch; | |
| using Sitecore.ContentSearch.Linq; | |
| using Sitecore.ContentSearch.Linq.Utilities; | |
| using Sitecore.ContentSearch.Utilities; | |
| using Sitecore.Data; | |
| using Sitecore.Data.Managers; | |
| using Sitecore.Globalization; | |
| using Sitecore.Services.GraphQL.Content.GraphTypes.ContentSearch; | |
| using Sitecore.Services.GraphQL.GraphTypes.Connections; |
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
| ############ | |
| # Author: Rich Rosiak | |
| # | |
| # This script gets all images for a given content location in language en | |
| # | |
| # Function ZipItems copied from item: | |
| # /sitecore/system/Modules/PowerShell/Script Library/SPE/Maintenance/Media Library Maintenance/Content Editor/Context Menu/Download | |
| # and then customized | |
| ############ | |
| function ZipItems( $zipArchive, $items ) |
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
| addEventListener('fetch', event => { | |
| event.respondWith(handleRequest(event.request)) | |
| }) | |
| /** | |
| * Fetch and log a request | |
| * @param {Request} request | |
| */ | |
| async function handleRequest(request) { | |
| // Parse request URL to get access to query string |
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
| $registry = "%registry name here, i.e. myregistry%" | |
| $repositories = docker images --digests | % { $_ -replace " +", "," } | convertfrom-csv | where { $_.REPOSITORY.StartsWith($registry) } | group REPOSITORY | |
| Write-Output "Found $($repositories.Count) local repositories from $($registry) registry" | |
| foreach ($group in $repositories) { | |
| $repository = $group.Name.Split('/')[1] | |
| $remoteData = az acr repository show-tags -n $registry --repository $repository --detail | convertfrom-json | |
| foreach ($localRepo in $group.Group) { | |
| $localRepo | Add-Member -NotePropertyName REPO -NotePropertyValue $repository |
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 prompt { | |
| $location = $executionContext.SessionState.Path.CurrentLocation.path | |
| #what is the maximum length of the path before you begin truncating? | |
| $len = 33 | |
| if ($location.length -gt $len) { | |
| #split on the path delimiter which might be different on non-Windows platforms |
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] $path | |
| ) | |
| function Expand-Tokens{ | |
| param( | |
| [string] $configName, | |
| [string] $path | |
| ) | |
| $root = $configName.Split(".") | |
| if ($root.Length -ge 1){ |