Skip to content

Instantly share code, notes, and snippets.

View TomDudfield's full-sized avatar

Tom Dudfield TomDudfield

View GitHub Profile
@TomDudfield
TomDudfield / Install-Solr.ps1
Created February 9, 2018 09:53 — forked from jermdavis/Install-Solr.ps1
A PowerShell script to help installing Solr as a service - See https://jermdavis.wordpress.com/2017/10/30/low-effort-solr-installs/ for details
Param(
$solrVersion = "6.6.2",
$installFolder = "c:\solr",
$solrPort = "8983",
$solrHost = "solr",
$solrSSL = $true,
$nssmVersion = "2.24",
$JREVersion = "1.8.0_151"
)
# Add the Sitecore MyGet repository to PowerShell
#Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2
# Install the Sitecore Install Framwork module
#Install-Module SitecoreInstallFramework
# Install the Sitecore Fundamentals module (provides additional functionality for local installations like creating self-signed certificates)
#Install-Module SitecoreFundamentals
# Import the modules into your current PowerShell context (if necessary)
@TomDudfield
TomDudfield / Unicorn_include.xml
Created April 6, 2017 15:20
Unicorn webdeploy include
<Target Name="CustomCollectFiles">
<ItemGroup>
<_CustomFiles Include="..\serialization\**\*" />
<FilesForPackagingFromProject Include="%(_CustomFiles.Identity)">
<DestinationRelativePath>App_Data\serialization\%(RecursiveDir)%(Filename)%(Extension) </DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
@TomDudfield
TomDudfield / Build.pub.xml
Last active April 6, 2017 15:22
Web Deploy include Unicorn files
<?xml version="1.0" encoding="utf-8"?>
<!--
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
using System.Collections.Generic;
using System.Linq;
using System.Xml.Linq;
using Sitecore;
using Sitecore.Data;
using Sitecore.Data.Fields;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
using Sitecore.Mvc.Extensions;
using Sitecore.Mvc.Pipelines.Response.GetXmlBasedLayoutDefinition;
using System.Web;
using Security;
[assembly: WebActivatorEx.PostApplicationStartMethod(typeof(AutoEncryptApplicationSettings), "AutoEncrypt")]
namespace Security
{
public class AutoEncryptApplicationSettings : AutoEncryptSettings
{
public static void AutoEncrypt()
{