Skip to content

Instantly share code, notes, and snippets.

bic742 / Get-PathsFromTds.ps1
Created August 9, 2023 13:45
This is a PowerShell script that will parse TDS scproj files and generate corresponding SCS module.json files. This process includes consolidation of paths to prevent overly prescriptive configurations. It also supports providing path exclusions to ignore things that should no longer be tracked in a newer tool.
function Invoke-DedupeOutput {
$dedupedIncludes = [System.Collections.ArrayList]@()
$datasource = Get-Item .
$referrers = $datasource | Get-ItemReferrer
$pageOnlyReferrers = $referrers | Where-Object { $_.Name -ne '__Standard Values' } | Sort-Object -Property Name -Unique
$pageOnlyReferrers = $pageOnlyReferrers | Where-Object { $_.Paths.Path -like '/sitecore/content/{site-node}' }
if ($pageOnlyReferrers.Count -eq 0) {
cassidydotdk / Build.ps1
Last active May 23, 2021 06:01
Complete Build and Publish Script. Will deploy all projects to publishing target, no HPP required.
aweber1 /
Last active February 27, 2021 02:38
JSS Rendering Host


The files in this gist demonstrate a fairly basic setup for a JSS rendering host.

DISCLAIMER: No guarantees that the code actually runs as-is. It was largely edited in place, so there may be typos or small syntax errors that you'll need to correct in your editor of choice. Feel free to leave a comment with any necessary fixes.

  • Sitecore config: jss-app-config.config This file is meant to show you how to setup your app config to use an external rendering host.

  • Entry point: jss-rendering-host-tunnel.js

cassidydotdk / gulp-config.js
Last active January 31, 2023 15:49
Task to build and publish a .SLN file from gulp using "msbuild" instead of "gulp-msbuild". Version 16.0 for VS2019, use 15.0 for VS2017.
module.exports = function () {
var config = {
websiteRoot: "C:\\inetpub\\wwwroot\\",
sitecoreLibraries: "C:\\inetpub\\wwwroot\\\\bin",
hostName: "",
solutionName: "sc911",
buildConfiguration: "Debug",
runCleanBuilds: false,
toolsVersion: "16.0"
michaellwest / CopyContentWithRainbow.ps1
Last active November 6, 2018 17:19
Sitecore PowerShell Extensions example transferring items between servers using rainbow serialization and spe remoting. You will want to be using SPE 5.1 or newer when transferring media items.
Import-Module -Name "SPE"
$session = New-ScriptSession -user "admin" -pass "b" -conn "https://spe-a"
$yaml = Invoke-RemoteScript -ScriptBlock {
$homeId = "{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}"
Get-ChildItem -Path "master:" -ID $homeId -WithParent -Recurse |
} -Session $session
$session2 = New-ScriptSession -user "admin" -pass "b" -conn "https://spe-b"
jraps20 / GetDatasourceDependencies.cs
Last active January 12, 2018 22:17
Full set of classes and config changes required to index modular content in Sitecore, i.e. content that is added to the page as a separate rendering with a datasource. Configured to only index certain renderings based on config, to disallow indexing of renderings that may be "Related Items" or other types of renderings that are shared and not pe…
using System.Linq;
using Sitecore;
using Sitecore.ContentSearch;
using Sitecore.ContentSearch.Pipelines.GetDependencies;
using Sitecore.Data;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
namespace Common.Sitecore.Search.GetDependencies
blacktambourine / JsonIndexableItem.cs
Created November 10, 2017 06:00
Custom Indexable item type for my non-sitecore data
using System;
using System.Collections.Generic;
using System.Globalization;
using MyCustomModels.Flights.Model;
using Sitecore.ContentSearch;
using Sitecore.ContentSearch.Converters;
using Sitecore.Data;
using Sitecore.Diagnostics;
namespace Business.Search.Json
tinogomes / DNS_TO_LOCALHOST.markdown
Last active June 21, 2024 23:18
Public DNS Pointing to localhost (

Available Public Wildcard DNS Domains pointing to localhost (

The best way to safely and securely use local domains pointing to is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.


# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS