Skip to content

Instantly share code, notes, and snippets.

Sean Kearney seankearney

Block or report user

Report or block seankearney

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@seankearney
seankearney / ItemReport.xsl
Last active Oct 12, 2016
XSLT for TDS Item Reports
View ItemReport.xsl
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
<xsl:output method="html" indent="yes"/>
<xsl:template match="ItemReport">
<html>
<head>
<title>
<xsl:value-of select="ProjectName"/>
</title>
View tds-deployment-properties-report.xslt
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ms="http://schemas.microsoft.com/developer/msbuild/2003">
<xsl:template match="ms:Project">
<html>
<body>
<h2>Deployment Properties</h2>
<table border="1">
View fiddle.response.json
{
"NextStepWalls": [{
"Id": "3e534aed-d6a3-406f-8489-6459475d9a65",
"Title": "OuterWall1",
"ShortDescription": "Hamburger brisket pork doner prosciutto tenderloin.",
"LongDescription": "Hamburger brisket pork doner prosciutto tenderloin. Tongue ribeye shank tenderloin capicola. Tenderloin drumstick landjaeger strip steak capicola, turducken pork loin doner filet mignon salami. Tongue turkey biltong filet mignon, spare ribs kevin chuck. Pork chop meatball tri-tip porchetta strip steak, beef ribs tenderloin kielbasa hamburger capicola bresaola pancetta ham hock. Shankle beef ribs swine pig chicken. Pastrami ball tip landjaeger cow venison ribeye tenderloin boudin t-bone rump.",
"ImageSrc": "/~/media/development/200x200.ashx",
"IsSemiLayer": false
},
{
View Sitecore-Bug-442839.aspx
<%@ Page Language="C#" Debug="true" %>
<script runat="server">
public void Page_Load()
{
Response.ContentType = "text/plain";
// wire up event handlers... Attach a debugger and look at the output window
EventHandlers.Init();
@seankearney
seankearney / install.ps1
Created Aug 6, 2014
NuGet install.ps1 to set CopyLocal to false
View install.ps1
param($installPath, $toolsPath, $package, $project)
write-host ===================================================
write-host "Setting 'CopyLocal' to false for the following references:"
$asms = $package.AssemblyReferences | %{$_.Name}
foreach ($reference in $project.Object.References)
{
if ($asms -contains $reference.Name + ".dll")
@seankearney
seankearney / Sitecore-IFilters.aspx
Last active Nov 12, 2016
Simple Sitecore/ASP.NET page to check what IFilters are known to the Sitecore system. It will also attempt to locate a media library item of each type and read text out of that file. This should help troubleshoot why some content inside of media library items are not being indexed.
View Sitecore-IFilters.aspx
<%@ Page Language="C#" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
// These are the extensions that Sitecore 7 supports indexing content for
// See: Sitecore.ContentSearch.ComputedFields.MediaItemContentExtractor
string[] extensions = new[]{ ".pdf",
".html",
".rtf",
@seankearney
seankearney / ProcessConfigFiles.ps1
Created Aug 20, 2013
When Sitecore installs a package, the config files in the package are saved with a different file name. This script will backup the old file and rename the new one.
View ProcessConfigFiles.ps1
#*=====================================================================
#* Function: ProcessConfigFiles
#*=====================================================================
#* Author: Charles Turano (Hedgehog Development http://hhogdev.com)
#* Arguments:
#* $WebRoot: Unc path to the server root
#* $PackageFileName: Filename of the package installed on the web server
#*=====================================================================
#* Purpose:
#* When Sitecore installs a package, the config files in the package are
@seankearney
seankearney / OutputMultipleFiles.tt
Last active May 1, 2018
This TDS Code Generation template is an example of how you can generate a multiple files that contains a single class in each.
View OutputMultipleFiles.tt
<#@ template language="C#" hostSpecific="true" #>
<#@ import namespace="System" #>
<#@ import namespace="System.IO" #>
<#@ import namespace="HedgehogDevelopment.SitecoreProject.VSIP.CodeGeneration.Models" #>
<#@ parameter name="Model" type="HedgehogDevelopment.SitecoreProject.VSIP.CodeGeneration.Models.SitecoreItem" #>
<#@ parameter name="DefaultNamespace" type="System.String" #>
<#
/************************************************************
@seankearney
seankearney / archiveLogs.ps1
Created Nov 5, 2012
IIS Log File Archive
View archiveLogs.ps1
##################################################################
# IIS Web Log Archive Script
# Takes a path to a directory containing IIS Log files
# Zips them up with 7-zip and stores the zip in a
# directory multiple levels up.
# Original log files are then deleted
#
# Expected folder structures:
# X:\Some\Directory\ContainAllLogs\
# |- Live
You can’t perform that action at this time.