Skip to content

Instantly share code, notes, and snippets.

@mursino
mursino / get-urls-from-sitemap.sh
Created June 14, 2022 19:32
Get URLs from a sitemap.xml file
curl https://www.DOMAIN.com/sitemap.xml | grep -e loc | sed 's|<loc>\(.*\)<\/loc>$|\1|g' > urls.txt
var cert = new X509Certificate2("client.pfx", "mySuperSecretPassword");
args.MongoSettings.SslSettings = new SslSettings();
args.MongoSettings.SslSettings.ClientCertificates = new[] { cert };
args.MongoSettings.UseSsl = true;
UpdateMongoDriverSettingsArgs updateMongoDriverSettingsArgs = new UpdateMongoDriverSettingsArgs(mongoUrl.DatabaseName, mongoSettings);
UpdateMongoDriverSettingsPipeline.Run(updateMongoDriverSettingsArgs);
MongoClient mongoClient = new MongoClient(updateMongoDriverSettingsArgs.MongoSettings);
<pipelines>
<updateMongoDriverSettings>
</updateMongoDriverSettings>
</pipelines>
var cert = new X509Certificate2("client.pfx", "mySuperSecretPassword");
var settings = new MongoClientSettings
{
SslSettings = new SslSettings
{
ClientCertificates = new[] { cert },
},
UseSsl = true
};
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:x="http://www.sitecore.net/xmlconfig/">
<sitecore>
<settings>
<setting name="IgnoreUrlPrefixes">
<patch:attribute name="value">/sitecore/default.aspx|/trace.axd|/webresource.axd|/sitecore/shell/Controls/Rich Text Editor/Telerik.Web.UI.DialogHandler.aspx|/sitecore/shell/applications/content manager/telerik.web.ui.dialoghandler.aspx|/sitecore/shell/Controls/Rich Text Editor/Telerik.Web.UI.SpellCheckHandler.axd|/Telerik.Web.UI.WebResource.axd|/sitecore/admin/upgrade/|/layouts/testing|/foo|/bar|/baz</patch:attribute>
</setting>
</settings>
</sitecore>
</configuration>
using Sitecore.Collections;
using Sitecore.Pipelines.HttpRequest;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Sitecore.PatchableIgnoreList
{
public class ProcessPatchedIgnores : HttpRequestProcessor
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<httpRequestBegin>
<processor type="Sitecore.PatchableIgnoreList.ProcessPatchedIgnores, Sitecore.PatchableIgnoreList">
<Paths hint="list:AddPaths">
<baz>/baz</baz>
</Paths>
</processor>
</httpRequestBegin>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<pipelines>
<httpRequestBegin>
<processor type="Sitecore.PatchableIgnoreList.ProcessPatchedIgnores, Sitecore.PatchableIgnoreList"
patch:after="processor[@type='Sitecore.Pipelines.HttpRequest.IgnoreList, Sitecore.Kernel']">
<Paths hint="list:AddPaths">
<foo>/foo</foo>
<bar>/bar</bar>
</Paths>