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
$baseTemplateId = "{20427F7C-8B5E-4799-A282-05376D978999}" | |
function IsTemplateStandardValue([Sitecore.Data.Items.Item]$item) | |
{ | |
$flag = $false | |
$hasScriptTemplate = Test-BaseTemplate -Item $item -Template $baseTemplateId | |
if ($hasScriptTemplate -and $item.Name -eq "__Standard Values") | |
{ | |
$flag = $true | |
} |
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
git remote prune origin && git repack && git prune-packed && git reflog expire --expire=1.month.ago && git gc --aggressive |
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
select count(*) from [xdb_processing_pools].[InteractionLiveProcessingPool] | |
select * from [xdb_processing_pools].[InteractionLiveProcessingPool] | |
select top 10 * from [cad_prod_Xdb.Collection.Shard0].[xdb_collection].InteractionFacets order by LastModified desc |
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
dir 404.*.txt /a /b /s | |
del 404.*.txt /a /s | |
Reference: https://confidentialfiles.wordpress.com/2010/06/02/a-quick-way-to-delete-all-files-with-a-certain-name-pattern-in-windows/ |
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
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title>Sitecore Temp Folder Browser</title> | |
<link rel="Stylesheet" type="text/css" href="/sitecore/shell/themes/standard/default/WebFramework.css" /> | |
<link rel="Stylesheet" type="text/css" href="./default.css" /> | |
</head> | |
<body> | |
<script runat="server"> | |
private const string TEMP_FOLDER_PATH = @"C:\inetpub\wwwroot\Sitecore\temp\"; | |
private const int MAX_FILE_COUNT = 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
# Run this script in Sitecore Powershell Extensions | |
# It will delete the minifed files from master and publish the deletions to web | |
# Next time the site is visited they should be re-generated (if they aren't check your settings http://bit.ly/2TfrcfC) | |
# TODO: When publishing, there might be a better way to target folders in the media library instead of the hardcoded list | |
$masterItems = Get-Item -Path master: -Query "/sitecore/media library//*[@@key='optimized-min']" | |
$webItems = Get-Item -Path web: -Query "/sitecore/media library//*[@@key='optimized-min']" | |
Write-Host "Master Items: $($masterItems.length)" |
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
$props = @{ | |
InfoTitle = "Remove workflows" | |
PageSize = 10000000 | |
} | |
Write-Host "Starting work in the context of the 'master' database, under /Home item." | |
Set-Location -Path "master:/sitecore/content/<YOURNODE>" | |
# Set up variables | |
$workflowState1 = "{13FDC8BC-60B9-44E1-ADCC-CED02E0392A9}" #ID of the workflow states. DRAFT |
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
Command Template: Install-Package -IgnoreDependencies -ID <Package.Name> -Version <version> | |
Example: Install-Package -IgnoreDependencies -ID Sitecore.Kernel -Version 9.3.0 (replacement for Sitecore.Kernel.NoReferences) |
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
app.UseOpenIdConnectAuthentication(new OpenIdConnectAuthenticationOptions | |
{ | |
ClientId = clientId, | |
ClientSecret = clientSecret, | |
Authority = authority, | |
MetadataAddress = metaDataUri, | |
RedirectUri = redirectUri, | |
ResponseType = OpenIdConnectResponseType.Code, | |
Scope = OpenIdConnectScope.OpenId, | |
PostLogoutRedirectUri = postLogoutRedirectUri, |
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 System; | |
using Microsoft.Owin; | |
using System.Threading.Tasks; | |
using System.Collections.Generic; | |
namespace Owin | |
{ | |
using Predicate = Func<IOwinContext, bool>; | |
using AppFunc = Func<IDictionary<string, object>, Task>; |
NewerOlder