Skip to content

Instantly share code, notes, and snippets.

@bic742
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.
Param(
[string]$srcPath
)
function Invoke-DedupeOutput {
Param(
[System.Collections.ArrayList]$includes
)
$dedupedIncludes = [System.Collections.ArrayList]@()
function Get-FormData($formId, $startDate, $endDate) {
$provider = [Sitecore.DependencyInjection.ServiceLocator]::ServiceProvider.GetService([Sitecore.ExperienceForms.Data.IFormDataProvider])
$entries = $provider.GetEntries($formId.Guid, $startDate, $endDate)
if (-not $entries) {
return $null
}
# Get all column title
$titles = new-object System.Collections.Generic.HashSet[string]
$entries | % { $_.Fields | % { $titles.Add($_.FieldName) > $null } }
@tackme31
tackme31 / UnpublishedPages.ps1
Created December 9, 2019 05:43 — forked from hombreDelPez/UnpublishedPages.ps1
Sitecore PowerShell script to list all unpublished pages
<#
.SYNOPSIS
Lists the pages which are not published yet (in the current version or any version at all).
.NOTES
Manuel Fischer
#>
function Get-AllUnpublishedPages {
Get-ChildItem -Path $homeFolder -Recurse | IsPage | IsPublished
@tackme31
tackme31 / search-non-default-items.ps1
Last active March 20, 2020 15:10
A Sitecore PowerShell Extensions script for searching items with non-default value in the field.
$readVariableParams = @{
Parameters = @(
@{Name="root"; Title="Root item"; Editor="droptree"; }
@{Name="template"; Title="Template"; Editor="droptree"; Source="DataSource=/sitecore/templates" }
@{Name="fieldname"; Title="Field name" }
)
Title = "Search Edited Items"
Description = "Search items with non-default value in the field."
}
@tackme31
tackme31 / update-licenses.ps1
Created July 9, 2019 04:42
A PowerShell script for updating the licenses of Sitecore 9.x
#Requires -RunAsAdministrator
param (
[Parameter(Mandatory=$true)]
[string]
$SitePrefix,
[Parameter(Mandatory=$false)]
[string]
$LicensePath = "$PSScriptRoot/license.xml",
[switch]
$WhatIf
@bradtraversy
bradtraversy / docker_wordpress.md
Last active April 23, 2024 20:57
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes
@alexshyba
alexshyba / ContextItemChildrenRenderingContentsResolver.cs
Created November 20, 2017 18:20
Sample IRenderingContentsResolver implementations.
using Newtonsoft.Json.Linq;
using Sitecore;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
using Sitecore.LayoutService.Configuration;
using Sitecore.LayoutService.ItemRendering;
using Sitecore.Links;
using Sitecore.Mvc.Presentation;
namespace Nomad.Jss.CodeFirst.ItemRendering
@jammykam
jammykam / ExtractPostProcessDllFromPackage.cs
Created September 20, 2017 22:05
Extract DLLs from TDS Update Packages
using Ionic.Zip;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Comcast.ExtractPostProcessDllFromPackage
{
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt