Skip to content

Instantly share code, notes, and snippets.

@phaniav
phaniav / RequestTimingFilter.cs
Created March 21, 2019 00:18 — forked from amokan/RequestTimingFilter.cs
example of IResultFilter and IActionFilter
using System.Diagnostics;
using System.Web.Mvc;
namespace YourApp.Web.Infrastructure.Filters
{
/// <summary>
/// Filter to display the execution time of both the action and result
/// </summary>
public class RequestTimingFilter : IActionFilter, IResultFilter
{
@phaniav
phaniav / Create Anti-Package.ps1
Created April 5, 2020 23:00 — forked from michaellwest/Create Anti-Package.ps1
Generates an anti-package from the selected package. Requires SPE 3.1.
$response = Show-ModalDialog -HandleParameters @{
"h"="Create an Anti-Package";
"t" = "Select a package that needs an anti-package";
"ic"="People/16x16/box.png";
"ok"="Pick";
"ask"="";
"path"= "packPath:$SitecorePackageFolder";
"mask"="*.zip";
} -Control "Installer.Browse"
$item = Get-Item master:/content/home
$newTemplate = [Sitecore.Configuration.Factory]::GetDatabase("master").Templates["Sample/Sample Item"];
$item.ChangeTemplate($newTemplate)