Skip to content

Instantly share code, notes, and snippets.

View JamesSkemp's full-sized avatar

James Skemp JamesSkemp

View GitHub Profile
@JamesSkemp
JamesSkemp / Convert Sitecore Web forms sublayout to Helix and MVC.md
Last active October 17, 2017 16:08
Rough notes on converting a Sitecore Web forms sublayout to MVC and Helix.

Background

We currently have a Visual Studio solution with two projects: one for our main site, using Web forms, and one for utilities, which is currently Extension methods on Item. (The latter project has been in the queue to migrate to a NuGet package on our local NuGet server.)

Running Sitecore 8.1.160519.

Initial setups

  1. Add solution folders to the existing project.
    1. Configuration
    2. Feature
    3. Foundation
@Adamsimsy
Adamsimsy / SwitchMasterToWeb-V7.config
Last active February 21, 2017 21:35
Revised #Sitecore7 SwitchMasterToWeb.config for Content Delivery to one available at http://sdn.sitecore.net/Reference/Sitecore%207/Scaling%20Guide.aspx . Some additional configuration was required to remove Master index configuration.
<?xml version="1.0" encoding="utf-8" ?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
<sitecore>
<sites>
<site name="shell" set:content="web" />
<site name="modules_shell" set:content="web" />
<site name="testing">
<patch:delete />
</site>
</sites>
@JamesSkemp
JamesSkemp / Extract Frames from GIF.cs
Last active October 7, 2015 01:38
Extract frames from GIF
var imagePath = @"C:\Users\James\Desktop\HL0hEkH.gif";
var exportDirectory = @"C:\Users\James\SkyDrive\Projects\graphic samples\export\";
var exportPathFormat = exportDirectory + "{0}.png";
Image img = Image.FromFile(imagePath);
var totalFrames = img.GetFrameCount(FrameDimension.Time);
string.Format("Total frames: {0}", totalFrames).Dump();