Skip to content

Instantly share code, notes, and snippets.

View solr75-install.ps1
Param(
$solrVersion = "7.5.0",
$installFolder = "c:\solr\solr75",
$solrPort = "8985",
$solrHost = "solr",
$solrSSL = $true,
$nssmVersion = "2.24",
$JREVersion = "1.8.0_111",
$solrInstanceName ="solr75"
)
View MediaIndexing-OOB-Sitecore
<mediaIndexing hint="skip">
<mimeTypes>
<excludes>
<mimeType>*</mimeType>
</excludes>
<includes>
<!--<mimeType>application/pdf</mimeType>
<mimeType type="Sitecore.ContentSearch.ComputedFields.MediaItemHtmlTextExtractor, Sitecore.ContentSearch">text/html</mimeType>
<mimeType>text/plain</mimeType>-->
</includes>
View Cleanup-MediaIndexing.config
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:env="http://www.sitecore.net/xmlconfig/env/">
<sitecore>
<scheduling>
<agent type="Sitecore.Tasks.CleanupAgent" method="Run" interval="24:00:00" >
<files hint="raw:AddCommand">
<!-- There might be other agents for logs folder cleanup -->
<remove folder="$(dataFolder)/mediaIndexing" pattern="*.*" maxAge="30.00:00:00" role:require="ContentManagement"/>
</files>
</agent>
</scheduling>
@brijbaroda
brijbaroda / Sitecore-Admin-Password-Reset
Created May 16, 2020
SQL Script to reset sitecore admin password to b
View Sitecore-Admin-Password-Reset
UPDATE [dbo].[aspnet_Membership]
SET password = '/b3f7qAl0GBqlrf0t+pgTHD6vVE='
,[PasswordSalt] = 'HGAgN+MeKpFyKqGHNggbUg=='
WHERE userid = '<GUID of admin user>'
GO
@brijbaroda
brijbaroda / SQL-Query-Table-Size-With-RecordsNumber.sql
Last active Apr 24, 2020
Database Query to find table sizes in GB along with number of records in each table
View SQL-Query-Table-Size-With-RecordsNumber.sql
select
o.name as [table_name],
sum(p.reserved_page_count) * 8.0 / 1024 / 1024 [size_in_gb],
p.row_count as [recrods]
from
sys.dm_db_partition_stats AS p,
sys.objects AS o
Where
p.object_id=o.object_id
and o.is_ms_shipped=0
@brijbaroda
brijbaroda / ConfigureSitecore.cs
Last active Nov 18, 2019
Sitecore Commerce - Localizing Category - ConfigureSitecore
View ConfigureSitecore.cs
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ConfigureSitecore.cs" company="Sitecore Corporation">
// Copyright (c) Sitecore Corporation 1999-2017
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace POC.Localization
{
using System.Reflection;
using Plugin.Localization.Pipelines.Blocks;
@brijbaroda
brijbaroda / ConfigureServiceApiBlock.cs
Created Nov 18, 2019
Sitecore Commerce - Localizing Category - ConfigureServiceApiBlock
View ConfigureServiceApiBlock.cs
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ConfigureServiceApiBlock.cs" company="Sitecore Corporation">
// Copyright (c) Sitecore Corporation 1999-2017
// </copyright>
// --------------------------------------------------------------------------------------------------------------------
namespace POC.Localization
{
using System.Threading.Tasks;
@brijbaroda
brijbaroda / LocalizeCatalogItemsPipeline.cs
Last active Nov 18, 2019
Sitecore Commerce - Localizing Category - LocalizeCatalogItemsPipeline
View LocalizeCatalogItemsPipeline.cs
using POC.Localization.Pipelines.Arguments;
using Microsoft.Extensions.Logging;
using Sitecore.Commerce.Core;
using Sitecore.Framework.Pipelines;
namespace POC.Localization.Pipelines
{
public class LocalizeCatalogItemsPipeline : CommercePipeline<LocalizationPipelineArgument, string>, ILocalizeCatalogItemsPipeline
{
@brijbaroda
brijbaroda / LocalizeCategory.cs
Created Nov 17, 2019
Sitecore Commerce - Localizing Category - LocalizeCategory
View LocalizeCategory.cs
using POC.Localization.Pipelines.Arguments;
using Microsoft.Extensions.Logging;
using Sitecore.Commerce.Core;
using Sitecore.Commerce.Core.Commands;
using Sitecore.Commerce.Plugin.BusinessUsers;
using Sitecore.Commerce.Plugin.Catalog;
using Sitecore.Commerce.Plugin.EntityVersions;
using Sitecore.Framework.Pipelines;
using System;
@brijbaroda
brijbaroda / LocalizationPipelineArgument.cs
Created Nov 17, 2019
Sitecore Commerce - Localizing Category - PipelineArgument
View LocalizationPipelineArgument.cs
using Sitecore.Commerce.Core;
using Sitecore.Commerce.Plugin.Catalog;
using Sitecore.Framework.Conditions;
using System.Collections.Generic;
namespace POC.Localization.Pipelines.Arguments
{
public class LocalizationPipelineArgument: PipelineArgument
{