Skip to content

Instantly share code, notes, and snippets.

{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@shanselman
shanselman / ohmyposhv3-v2.json
Last active March 28, 2024 11:48
ohmyposhv3-v2
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@davidknipe
davidknipe / CreateGetaCategoriesFromEpiserverCategoriesJob.cs
Created October 10, 2019 15:39
Create Geta Categories based on existing Episerver category structure
using System.Collections.Generic;
using System.Linq;
using EPiServer;
using EPiServer.Core;
using EPiServer.DataAbstraction;
using EPiServer.PlugIn;
using EPiServer.Scheduler;
using Foundation.Cms.Categories;
using Geta.EpiCategories;
using Geta.EpiCategories.Extensions;
@davidknipe
davidknipe / MigrateContentToGetaCategoriesJob.cs
Last active October 13, 2019 23:31
Migrates content to use Geta Categories. Note will only migrate categories that exist in the Geta Categories structure.
using System.Collections.Generic;
using System.Linq;
using EPiServer;
using EPiServer.Core;
using EPiServer.DataAbstraction;
using EPiServer.PlugIn;
using EPiServer.Scheduler;
using EPiServer.Security;
using Foundation.Cms.Categories;
using Geta.EpiCategories;
@davidknipe
davidknipe / PostClickInterceptor.cs
Last active August 6, 2019 07:34
Episerver tracking data interceptor to create Episerver Campaign post clicks from Episerver Insight tracking events
using System.Configuration;
using System.Linq;
using System.Net;
using System.Web;
using System.Web.Hosting;
using Episerver.Marketing.Common.Helpers;
using EPiServer.ServiceLocation;
using EPiServer.Tracking.Commerce.Data;
using EPiServer.Tracking.Core;
using EPiServer.Tracking.PageView;
namespace EPiServer.Reference.Commerce.Site.Features.Promotions
{
using System.ComponentModel.DataAnnotations;
using EPiServer.Commerce.Catalog.ContentTypes;
using EPiServer.Commerce.Marketing;
using EPiServer.Commerce.Marketing.DataAnnotations;
using EPiServer.Core;
using EPiServer.DataAnnotations;
@kamsar
kamsar / anexample.ps1
Last active October 18, 2023 14:27
Generate trusted local SSL cert for Solr
# Usage:
# This script is designed to be run after you have Solr running locally without SSL
# It will generate a trusted, self-signed certificate for LOCAL DEV (this must be modified for production)
# Notes: The keystore must be under server/etc on Solr root, and MUST be named solr-ssl.keystore.jks
# The cert will be added to locally trusted certs, so no security warnings in browsers
# You must still reconfigure Solr to use the keystore and restart it after running this script
#
# THIS SCRIPT REQUIRES WINDOWS 10 (for the SSL trust); without 10 remove the lines around trusting the cert.
namespace EPiServer.SocialAlloy.Web.Business.FindHelpers
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using EPiServer.Core;
using EPiServer.Find;
@jstemerdink
jstemerdink / ImageFile.cs
Last active April 3, 2017 02:05
Tag your images by using the Microsoft Computer Vision API.
using System.ComponentModel.DataAnnotations;
using Episerver.Playground10.Models.Properties;
using EPiServer.Core;
using EPiServer.DataAnnotations;
using EPiServer.Framework.DataAnnotations;
using EPiServer.Web;
[ContentType(GUID = "0A89E464-56D4-449F-AEA8-2BF774AB8730")]
@akshaysura
akshaysura / HabitatSolutionScript.ps1
Created January 21, 2017 23:34
Create a Sitecore Helix solution from scratch using PowerShell
#paths to the project templates on your system
$global:classTemplate = "D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplatesCache\CSharp\Windows Root\Windows\1033\ClassLibrary\csClassLibrary.vstemplate"
$global:webTemplate = "D:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\ProjectTemplatesCache\CSharp\Web\1033\WebApplicationProject40\EmptyWebApplicationProject40.vstemplate"
#variable used to store the path for the empty Habitat folder
$global:helixPath =""
#empty variable used to store the solution name
$global:solutionName = ""