This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Powershell Script for creating a 3x5 shard cluster | |
# Based on Mongo University M101 lecture, "Building a Shared Environemnt" https://youtu.be/dn45G2yw20A | |
$rootpath = "/temp/mongoshards/" | |
new-module -scriptblock {function report($text) { | |
write-output $("-" * $text.length) | |
write-output $text | |
write-output $("-" * $text.length) | |
write-output "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from "axios" | |
// To use previous step data, pass the `steps` object to the run() function | |
export default defineComponent({ | |
props: { | |
data: {type: "data_store"} | |
}, | |
async run({ steps, $ }) { | |
// Return data to use it in future steps | |
var url = process.env.NGROK_SITECORE_CM_URL; | |
if (url.substr(-1) != '/') url += '/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-Token { | |
$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" | |
$headers.Add("Content-Type", "application/x-www-form-urlencoded") | |
$headers.Add("Accept", "application/json") | |
$body = "password=b&grant_type=password&username=sitecore%5Cadmin&client_id=postman-api&scope=openid%20sitecore.profile%20sitecore.profile.api" | |
$response = Invoke-RestMethod 'https://xm1id.localhost/connect/token' -Method 'POST' -Headers $headers -Body $body | |
$response | ConvertTo-Json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<pipelines> | |
<initialize> | |
<processor type="Sitecore.SharedSource.Pipelines.WriteShowConfigToLog.Processor, Sitecore.SharedSource.WritreShowConfig" patch:before="processor[1]"/> | |
</initialize> | |
</pipelines> | |
</sitecore> | |
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- NOTE: THIS IS A FRAGMENT. INCLUDE THIS IN Sitecore.IdentityServer.Host.xml, in node /Settings/Sitecore/IdentityServer/Clients --> | |
<!-- Postman configuration documented here: https://doc.sitecore.com/xp/en/developers/92/sitecore-experience-commerce/bearer-token-authentication.html --> | |
<PostmanClient> | |
<ClientId>postman-api</ClientId> | |
<ClientName>Postman API</ClientName> | |
<AccessTokenType>0</AccessTokenType> | |
<AllowOfflineAccess>true</AllowOfflineAccess> | |
<AlwaysIncludeUserClaimsInIdToken>false</AlwaysIncludeUserClaimsInIdToken> | |
<AccessTokenLifetimeInSeconds>3600</AccessTokenLifetimeInSeconds> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-SitecoreReleaseNotes() | |
{ | |
$links = (invoke-webrequest https://dev.sitecore.net/Downloads/Sitecore_Experience_Platform.aspx).Links | |
$versions = $links |? {$_.innerText -like 'Sitecore Experience Platform*' -and $_.InnerText -notlike '*and below*'} # https://www.howtogeek.com/124736/stupid-geek-tricks-extract-links-off-any-webpage-using-powershell/ | |
$versionlinks = @{} | |
$versions |% { $versionLinks.Add($_.innerHtml, $_.href)} | |
$releaseNotes = @{} | |
$versionLinks.Keys |%{ | |
$releaseNotesUrl = "https://dev.sitecore.net" + ($versionLinks[$_]).Trim(".aspx") + "/Release%20Notes" | |
Write-Verbose $releaseNotesUrl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page %> | |
<%@ Import namespace="Sitecore.ContentSearch" %> | |
<%@ Import namespace="Sitecore.ContentSearch.SearchTypes" %> | |
<html> | |
<body> | |
<form runat=server> | |
<!-- <asp:textbox runat=server id=tb1 /> --> | |
<asp:button runat=server text=Click onclick=DoSearch /> | |
<script runat=server> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/" xmlns:env="http://www.sitecore.net/xmlconfig/env/"> | |
<sitecore > | |
<services> | |
<configurator type="CustomCampaignRepository.ServicesConfigurator, CustomCampaignRepository" /> | |
</services> | |
</sitecore> | |
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Runtime.CompilerServices; | |
using System.Security; | |
using System.Security.Claims; | |
using System.Security.Cryptography; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Threading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using IdentityServer4; | |
using Microsoft.AspNetCore.Authentication; | |
using Microsoft.Extensions.DependencyInjection; | |
using Sustainsys.Saml2; | |
using Sustainsys.Saml2.Configuration; | |
using Sustainsys.Saml2.Metadata; | |
using Sustainsys.Saml2.WebSso; | |
namespace SitecoreIdentitySamlDemo | |
{ |
NewerOlder