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 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 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
| $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 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
| -- 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 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
| $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 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
| stages: | |
| - build:dotnet | |
| default: | |
| image: | |
| name: gcr.io/kaniko-project/executor:debug | |
| entrypoint: [""] | |
| .job_template: | |
| script: &script_definition |
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
| $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" |
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
| -- Find field data not associated with an item. | |
| SELECT Id FROM SharedFields f | |
| WHERE NOT EXISTS (SELECT ID FROM Items i WHERE i.ID = f.ItemId) | |
| SELECT Id FROM UnversionedFields f | |
| WHERE NOT EXISTS (SELECT ID FROM Items i WHERE i.ID = f.ItemId) | |
| SELECT Id FROM VersionedFields f | |
| WHERE NOT EXISTS (SELECT ID FROM Items i WHERE i.ID = f.ItemId) |
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
| #$provider = [Sitecore.DependencyInjection.ServiceLocator]::ServiceProvider.GetService([Sitecore.XA.Foundation.Abstractions.Configuration.IConfiguration[Sitecore.XA.Foundation.Search.SearchConfiguration]]).GetConfiguration().QueryMaxItems | |
| $query = "+template:{51ed5851-1a61-4dae-b803-6c7fae6b43d8};+sxa:SameFirstTagAsCurrentPage|SxaTags;custom:EventStartDate|[NOW TO *];custom:EventEndDate|[NOW TO *];sort:eventstartdate;sort:isfeatured[desc]" | |
| $modelList = [Sitecore.ContentSearch.Utilities.SearchStringModel]::ParseDatasourceString($query) | |
| $contextItem = Get-Item -Path "master:" -ID "{31318AEE-310B-4EE4-84DA-4B84471E0FCA}" | |
| [Sitecore.DependencyInjection.ServiceLocator]::ServiceProvider.GetService([Sitecore.XA.Foundation.Search.Services.ISearchQueryTokenResolver]).Resolve($modelList, $contextItem) | |
| class CustomSearchResultItem : SearchResultItem | |
| { | |
| [Sitecore.ContentSearch.IndexField("eventstartdate_tdt")] |