Skip to content

Instantly share code, notes, and snippets.

View seankearney's full-sized avatar

Sean Kearney seankearney

View GitHub Profile
@seankearney
seankearney / archiveLogs.ps1
Created November 5, 2012 19:52
IIS Log File Archive
##################################################################
# 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
@seankearney
seankearney / OutputMultipleFiles.tt
Last active May 1, 2018 13:23
This TDS Code Generation template is an example of how you can generate a multiple files that contains a single class in each.
<#@ 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 / ProcessConfigFiles.ps1
Created August 20, 2013 14:54
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.
#*=====================================================================
#* 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 / Sitecore-IFilters.aspx
Last active November 12, 2016 02:08
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.
<%@ 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 / install.ps1
Created August 6, 2014 13:32
NuGet install.ps1 to set CopyLocal to false
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-Bug-442839.aspx
Created July 17, 2015 19:52
Sitecore-Bug-442839
<%@ 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();
{
"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
},
{
<?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">
@seankearney
seankearney / ItemReport.xsl
Last active October 12, 2016 20:52
XSLT for TDS Item Reports
<?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>
@seankearney
seankearney / applist.md
Created April 17, 2020 14:31
Desktop Apps & Utils