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
using Microsoft.AspNet.Identity; | |
using Sitecore.Diagnostics; | |
using Sitecore.Owin.Authentication.Extensions; | |
using Sitecore.Owin.Authentication.Pipelines.CookieAuthentication.SignIn; | |
using Sitecore.Owin.Authentication.Services; | |
using Sitecore.Security.Accounts; | |
using System.Security.Claims; | |
namespace Scms.Feature.Security.Pipelines.CookieAuthentication.SignIn | |
{ |
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
docker image ls --format "{{json .Repository}},{{json .Tag}},{{json .ID}}" | | |
ConvertFrom-Csv -Header "Repository","Tag","Id" | | |
Where-Object { $_.Tag -ne "<none>" -and $_.Repository.Contains("/") } | | |
ForEach-Object { docker pull "$($_.Repository):$($_.Tag)"} |
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 | |
Report all the PowerShell Script (Library) items which contain a ShowRule or EnableRule | |
.NOTES | |
Michael West | |
#> | |
$items = Get-ChildItem -Path "master:" -ID "{A3572733-5062-43E9-A447-54698BC1C637}" -Recurse | Where-Object { ($_.ShowRule -and $_.ShowRule -ne "<ruleset />") -or ($_.EnableRule -and $_.EnableRule -ne "<ruleset />") } |
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 Get-ModifiedItem { | |
param( | |
$databaseName, | |
$filename | |
) | |
$resourceLoaderType = ([System.Type]::GetType("Sitecore.Data.DataProviders.ReadOnly.Protobuf.IResourceLoader, Sitecore.Data.ResourceItems.ProtobufNet")) | |
$resourceLoader = [Sitecore.DependencyInjection.ServiceLocator]::ServiceProvider.GetService($resourceLoaderType) | |
$paths = [System.Collections.Generic.List[String]]@() | |
$paths.Add([Sitecore.MainUtil]::MapPath("/App_Data/items/$($databaseName)/$($filename)")) > $null |
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
$connection = [Hangfire.JobStorage]::Current.GetConnection() | |
$recurringJobs = [Hangfire.Storage.StorageConnectionExtensions]::GetRecurringJobs($connection) | |
$props = @{ | |
Title = "Hangfire Recurring Jobs" | |
InfoTitle = "Recurring Jobs Report" | |
InfoDescription = "This report provides details on the currently scheduled recurring jobs." | |
PageSize = 25 | |
Property = @( | |
"Id", |
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
-- https://www.sqlshack.com/how-to-identify-and-resolve-sql-server-index-fragmentation/ | |
SELECT S.name as 'Schema', | |
T.name as 'Table', | |
I.name as 'Index', | |
DDIPS.avg_fragmentation_in_percent, | |
DDIPS.page_count | |
FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, NULL) AS DDIPS | |
INNER JOIN sys.tables T on T.object_id = DDIPS.object_id | |
INNER JOIN sys.schemas S on T.schema_id = S.schema_id | |
INNER JOIN sys.indexes I ON I.object_id = DDIPS.object_id |
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
$matchedItems = [System.Collections.ArrayList]@() | |
$revisionFilter = @("9323dec0-9b37-4fae-b87c-2dc12cbea0f2") | |
Get-ChildItem -Path "master:\media library" -Recurse | | |
Where-Object { [string]::IsNullOrEmpty($PSItem["__revision"]) -or $revisionFilter -contains $PSItem["__revision"] } | | |
ForEach-Object { $matchedItems.Add([PSCustomObject]@{"ItemId"=$PSItem.ID; "RevisionId"=$PSItem["__revision"]; "ItemPath"=$PSItem.ItemPath}) > $null } | |
$matchedItems | Show-ListView |
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
stages: | |
- build:dotnet | |
default: | |
image: | |
name: gcr.io/kaniko-project/executor:debug | |
entrypoint: [""] | |
.job_template: | |
script: &script_definition |
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
$ips = @( | |
"19.143.116.98" | |
"19.143.116.98" | |
"19.143.116.98" | |
"19.143.116.98" | |
"19.143.116.98" | |
"19.143.116.98" | |
"19.143.116.98" | |
"19.143.116.98" | |
"15.37.53.228" |