Skip to content

Instantly share code, notes, and snippets.

@bala-one
bala-one / Embeddable_Forms_Framework.html
Last active December 15, 2022 03:20
Sitecore Embeddable Forms Demo Code
<html>
<head>
<script type="text/css" src="css/styles.css"></script>
</head>
<body>
<h1>Sitecore Embeddable Forms Demo</h1>
<scef-form formId="{B5D9B438-40DD-4E8B-80BD-A9DDE0DB8382}"></scef-form>
<script type="text/javascript"
src="./sitecore-embeddableforms.umd.js?sc_site=https://sc103cm.dev.local&sc_apikey=DAC359D9-DC3E-43D4-9FCC-CA61F4A43D89">
</script>
@bala-one
bala-one / coveoInboundFilterPipeline.config
Created September 21, 2022 17:22
Config entry for HasLayoutOrTemplateInboundFilter
<coveoInboundFilterPipeline>
<!--
<processor type="Coveo.SearchProvider.CoveoInboundFilters.HasLayoutInboundFilter, Coveo.SearchProviderBase">
<ApplyToPaths>/sitecore/content/MySite</ApplyToPaths>
</processor>
-->
<processor type="My.Foundation.Custom.Framework.Pipelines.Coveo.HasLayoutOrTemplateInboundFilter, My.Foundation.Custom.Framework">
<ApplyToPaths>/sitecore/content/MySite</ApplyToPaths>
<TemplatesToInclude>f5dec7cb-b9b9-49e8-a538-225ca21bc339;02edadb5-6f59-4256-81b7-bac2c6839bd9</TemplatesToInclude>
</processor>
@bala-one
bala-one / HasLayoutOrTemplateInboundFilter.cs
Created September 21, 2022 17:11
Coveo Custom Pipeline to Index Items without Layout
using Coveo.Framework.Items;
using Coveo.Framework.Utils;
using Coveo.SearchProvider.InboundFilters;
using Coveo.SearchProvider.Pipelines;
using Sitecore.Data.Items;
using Sitecore.Data.Managers;
using System.Collections.Generic;
namespace My.Foundation.Custom.Framework.Pipelines.Coveo
{
@bala-one
bala-one / CustomExternalUserBuilder_2.xml
Last active February 28, 2022 02:46
Sitecore External User builder for Azure Active Directory Integration 2
<mapEntry>
<!-- <externalUserBuilder type="Sitecore.Owin.Authentication.Services.DefaultExternalUserBuilder, Sitecore.Owin.Authentication"> -->
<externalUserBuilder type="My.Foundation.Custom.AzureAD.CustomExternalUserBuilder, My.Foundation.Custom.AzureAD" resolve="true">
<IsPersistentUser>true</IsPersistentUser>
</externalUserBuilder>
</mapEntry>
@bala-one
bala-one / CustomExternalUserBuilder.cs
Last active February 28, 2022 01:14
Sitecore External User builder for Azure Active Directory Integration
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.Owin;
using Sitecore.Owin.Authentication.Identity;
using Sitecore.Owin.Authentication.Services;
using Sitecore.SecurityModel.Cryptography;
using System;
using System.Net.Mail;
using System.Security.Claims;
using System.Text;
@bala-one
bala-one / CustomExternalUserBuilder.xml
Last active November 2, 2021 17:00
No matching constructor was found. Constructor parameters: Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: Sitecore.Exceptions.ConfigurationException: Could not create instance o…
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/"
xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:security="http://www.sitecore.net/xmlconfig/security/">
<sitecore>
<federatedAuthentication type="Sitecore.Owin.Authentication.Configuration.FederatedAuthenticationConfiguration, Sitecore.Owin.Authentication">
<identityProvidersPerSites hint="list:AddIdentityProvidersPerSites">
<!-- Defines a list of providers assigned to all sites. -->
<mapEntry name="all sites" type="Sitecore.Owin.Authentication.Collections.IdentityProvidersPerSitesMapEntry, Sitecore.Owin.Authentication">
<!-- The list of site names for which the specified identity providers will work.
Note: the fedauth.siteNameExpander pipeline processes each site name, which gives the ability to use expressions like
"regexp:modules_.*" or "database:web" or "domain:extranet" -->
{
"profiles":{
"defaults":{
"font":{
"face":"Cascadia Code PL"
}
}
}
}
Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme Paradox
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck
$location = "C:\inetpub\wwwroot\ca.demo.com\App_Data\TDSDeploy";
$siteName = "ca.demo.com";
Start-Process powershell.exe -ArgumentList "-file $location\UPMC_WebDeploy.ps1", "-PackagePath $location\UPMC.Deploy.TDS.wdp.zip","-MSDeployAllowUntrusted","-SiteName $siteName", "-ComputerName 127.0.0.1", "-Username msdeployuser", "-Password yourpass123", "-AuthType Basic"