Skip to content

Instantly share code, notes, and snippets.

View isaadansari's full-sized avatar
💭
For getting something you never had, you have to do something you never did!

Saad Ansari isaadansari

💭
For getting something you never had, you have to do something you never did!
View GitHub Profile
@dylanyoung-dev
dylanyoung-dev / Sitecore Docker Cheatsheet
Last active April 27, 2021 05:07
Docker Cheatsheet for getting setup with Sitecore Docker folder and then how to manage my docker images locally.
## Sitecore Docker Repository (Clone Locally)
git clone https://github.com/Sitecore/docker-images/
## Change Directory to Root of Cloned Repository
cd docker-images
## Run Build.ps1 (with default tags)
.\Build.ps1
## Set Path for License File
@vitaliitylyk
vitaliitylyk / DescendantsTreeRenderingContentsResolver.cs
Last active June 20, 2019 12:43
A custom Sitecore JSS rendering contents resolver, which serializes items into a tree-like JSON structure. More information at https://blog.vitaliitylyk.com/jss-and-arbitrary-item-hierarchies/
using Newtonsoft.Json.Linq;
using Sitecore.Data.Items;
using Sitecore.LayoutService.Configuration;
namespace VitaliiTylyk.JavascriptServices.RenderingContentsResolvers
{
/// <summary>
/// Builds a tree-like structure of datasource item's descendants
/// </summary>
public class DescendantsTreeRenderingContentsResolver : Sitecore.LayoutService.ItemRendering.ContentsResolvers.RenderingContentsResolver
@michaellwest
michaellwest / Update-SPE-Module-Icons.ps1
Last active October 3, 2018 17:42
Update modules to use the new Sitecore PowerShell Extensions 5.0 icons.
<#
.SYNOPSIS
Sitecore PowerShell Extensions 5.0 uses new icons. This script is designed to update
your existing modules to use the new icon.
.DESCRIPTION
The SPE module changes the icon when you enable/disable the module. Only disabled modules
will automatically take the new icon. This is script helps by updating all of the icons
for enabled modules. Alternatively, you can go through and disable then enable the modules.
#>
@isaadansari
isaadansari / Install-Solr-6.6.2.ps1
Last active October 26, 2019 10:46 — forked from jermdavis/Install-Solr.ps1
A PowerShell script to help installing Solr as a service - See https://jermdavis.wordpress.com/2017/10/30/low-effort-solr-installs/ for details
Param(
$solrVersion = "6.6.2",
$installFolder = "c:\solr",
$solrPort = "8983",
$solrHost = "solr",
$solrSSL = $true,
$nssmVersion = "2.24",
$JREVersion = "9.0.1"
)
# Add the Sitecore MyGet repository to PowerShell
Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2
# Install the Sitecore Install Framwork module
Install-Module SitecoreInstallFramework
# Install the Sitecore Fundamentals module (provides additional functionality for local installations like creating self-signed certificates)
Install-Module SitecoreFundamentals
# Import the modules into your current PowerShell context (if necessary)
@sebastiantecsi
sebastiantecsi / Install-SolrWin81.ps1
Last active June 8, 2018 12:27
A PowerShell script to help installing Solr as a service on Windows 8.1 based on the idea from here https://jermdavis.wordpress.com/2017/10/30/low-effort-solr-installs/
Param(
$solrVersion = "6.6.2",
$installFolder = "c:\solr",
$solrPort = "8983",
$solrHost = "solr",
$solrSSL = $true,
$nssmVersion = "2.24",
$JREVersion = "1.8.0_151"
)
@RobsonAutomator
RobsonAutomator / pssolrservice.ps1
Created November 13, 2017 10:13
Install Solr as Windows Service without dependencies
#
# PSSolrService.ps1
#
<# region Description
###############################################################################
# #
# File name PSService.ps1 #
# #
# Description A sample service in a standalone PowerShell script #
# #
@jermdavis
jermdavis / SolrInstall-SIF-Extension.psm1
Last active November 23, 2021 13:29
A Sitecore Install Framework extension to install a development instance of Solr - Further detail at: https://blog.jermdavis.dev/posts/2017/solr-installs-with-sif
##
## private functions
##
#
# If necessary, download a file and unzip it to the specified location
#
function downloadAndUnzipIfRequired
{
Param(
@AdamNaj
AdamNaj / Convert-EventsToSearchable.ps1
Created September 15, 2017 10:21
Better Events List Script - Convert SXA Events templates into searchable items
$tenantTemplatesPath = "master:\templates\Project\Showcase"
$sitePath = "master:\content\Showcase\int"
function Assert-FeatureTemplateInProject {
[CmdletBinding()]
param(
[parameter(Mandatory=$true)]
[String[]] $TenantTemplateFolder,
[parameter(Mandatory=$true)]
@alan-null
alan-null / Merge-Layout.ps1
Last active January 20, 2018 11:46
Merging Final Renderings back down into Shared Renderings
function Merge-Layout {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true,Position = 0,ValueFromPipeline = $true)]
[item]$Item
)
process {
$layoutField = New-Object "Sitecore.Data.Fields.LayoutField" -ArgumentList ($Item.Fields[[Sitecore.FieldIDs]::LayoutField]);
$finalLayoutField = New-Object -TypeName "Sitecore.Data.Fields.LayoutField" -ArgumentList $Item.Fields[[Sitecore.FieldIDs]::FinalLayoutField]