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
$projects = Get-ChildItem -Path "C:\{solution_dir}\src" -Filter *csproj -Recurse | ForEach-Object { $project = $_; $packages = Select-Xml -Path "$($project.Directory.FullName)/packages.config" -XPath '/packages/package' | ForEach-Object { if ($_.Node.id -like "Sitecore*" -and $_.Node.version -eq "9.1.1") { Install-Package $_.Node.id -Project $project.BaseName -Version "10.2.0" -IgnoreDependencies } } } |
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
$searchPath = "C:\my_repo\src" | |
$assemblyName = "Sitecore.Horizon.Integration" | |
$versionPathMap = @{} | |
$files = Get-ChildItem -Path $searchPath -Recurse | | |
Where-Object { $_.Name -eq "$assemblyName.dll" } | |
foreach ($file in $files) { | |
$versionPathMap.Add($file.FullName, [Reflection.AssemblyName]::GetAssemblyName($file.FullName).Version) | |
} |
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
namespace MyClient.Foundation.Services | |
{ | |
using Sitecore.Data.Items; | |
using Sitecore.ExperienceEdge.Connector.Abstraction.DirectPublishing; | |
public class EdgeService : IEdgeService | |
{ | |
private const string EdgePublishingTargetId = "{3013BEED-71CA-4DE3-A1D2-17DD871597F1}"; | |
/// <summary> |
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
# Root path to look 'orphan' items under - update here as needed | |
cd 'master:/sitecore/media library' | |
$counter = 0 | |
$itemsToProcess = Get-ChildItem -Recurse . | Where-Object { $_.TemplateName -ne 'Media Folder' } | |
if ($itemsToProcess -ne $null) { | |
$itemsToProcess | ForEach-Object { | |
$referrers = Get-ItemReferrer -Item $_ | measure | |
if ($referrers.Count -eq 0) { | |
$counter++ |
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
// This code makes it easier to ping your layout service without having to remember the long URL that is accessible by default. | |
// Add this file to /pages/api/viewpage or wherever you want. | |
// From there, all you need to do is visit /api/viewpage to view the layout service response for your home page | |
// Subpage would be /api/viewpage/someSubPage | |
// Note that this will be PUBLICLY VIEWABLE, so make sure to lock it down somehow, possibly with this or WAF rules: | |
// https://doc.sitecore.com/xp/en/developers/hd/200/sitecore-headless-development/walkthrough--creating-a-user-and-page-for-testing-sitecore-authentication.html | |
import type { NextApiRequest, NextApiResponse } from 'next'; | |
const handler = async (req: NextApiRequest, res: NextApiResponse): Promise<void> => { |
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
Sitecore Cloud | |
============================================================================================= | |
SonarScanner.MSBuild.exe begin /o:"app-one" /k:"sitecore-001" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.login="9d25b5f7c3efdb14a07da6f580932c94f00403aa" | |
MsBuild.exe Sitecore-Review.sln /t:Rebuild | |
SonarScanner.MSBuild.exe end /d:sonar.login="9d25b5f7c3efdb14a07da6f580932c94f00403aa"insert into NotificationQueue(UniqueId, ItemPublishQueueUniqueId, UserId, DealInLikedCategory, IsProcessed, NotificationMessageUniqueId, DateCreated, DateChanged)values(NEWID(), NEWID(), '5bc1ce12-f365-46c2-ba8f-d01ba43e66c1', 1, 0, '8a90352e-1409-4810-80e1-007262f3b7f5', '2008-11-11', '2008-11-11') |
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
#Requires -RunAsAdministrator | |
[CmdletBinding()] | |
Param ( | |
[Parameter(Mandatory = $true, | |
Position=0, | |
HelpMessage = "Name of the IIS Site the new URLs should be associated to")] | |
[ValidateNotNullOrEmpty()] | |
[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
########## | |
# Tweaked Win10 Initial Setup Script | |
# Primary Author: Disassembler <[email protected]> | |
# Modified by: alirobe <[email protected]> based on my personal preferences. | |
# Version: 2.20.2, 2018-09-14 | |
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script | |
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/ | |
# Tweak difference: | |
# | |
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ... |
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 React, { useEffect, useState } from 'react'; | |
import { withSitecoreContext, dataApi, Placeholder } from '@sitecore-jss/sitecore-jss-react'; | |
import { dataFetcher } from './dataFetcher'; | |
import config from './temp/config'; | |
const HybridPlaceholder = ({ | |
name, | |
rendering, | |
sitecoreContext, | |
}) => { |
NewerOlder