Skip to content

Instantly share code, notes, and snippets.

View CameronWills's full-sized avatar

Cameron Wills CameronWills

  • Sydney, Australia
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CameronWills
CameronWills / IndexingService.cs
Last active October 7, 2020 00:22
Fix for EpiServer crash: BuildResult change, cache key=cindexingservice.svc.1f180bcd
using System;
using System.ServiceModel;
using System.ServiceModel.Activation;
namespace Web.IndexingService
{
/// <summary>
/// Replacing the logic found in the IndexingService.svc to try and address a bug at where the run-time compiled assembly has a file-change causing the
/// App Domain to shutdown/restart. In some cases the shutdown failed, resulting in two AppDomains to be running. More details here:
/// https://world.episerver.com/forum/developer-forum/Problems-and-bugs/Thread-Container/2019/8/application-restart-loop-because-of-buildresult-change-cache-keycindexingservice-svc-1f180bcd/
console.log("1");
console.log("1");

Pull Request Checklist

Mark [x] to those completed. Delete sections that don't apply.

Linting
[] Fixed CSS errors? [] Fixed JS errors?

Browsers

@CameronWills
CameronWills / edit-mode.css
Created March 26, 2017 08:28
EpiServer v10 all properties view - Add a red star (*) to required properties / field labels
/* Add a required star (*) to fields marked as required */
.Sleek .epi-form-container__section__row label span.edit-required {
font-weight: bold;
color: red;
}
@CameronWills
CameronWills / EpiServerImageService.cs
Last active March 8, 2017 00:17
Implementation of ImageProcessor's IImageService interface for EpiServer - Retrieves EpiServer blobs for processing by ImageProcessor
/// <summary>
/// EpiServer implementation of an ImageProcessor IImageService - provides the episerver image blobs to ImageProcessor for resizing etc.
/// </summary>
public class EpiServerImageService : IImageService
{
/// <summary>
/// Gets or sets the prefix for the given implementation.
/// <remarks>
/// This value is used as a prefix for any image requests that should use this service.
/// </remarks>
@CameronWills
CameronWills / Git-Branching-Strategy.md
Last active January 30, 2017 05:30
Git Branching Strategy

When working on our git repositories, this is the general workflow / branching strategy we follow:

  • Development happens on the master branch (this way new developers can start writing code as soon as they've clone the repository)

  • Long-running development on a features/feature_name branch and then merged into master

  • Work to be done by vendors happen on a vendors/vendor_name branch and merged into master after being checked over (use pull requests).

  • Merge master into deploy/production or deploy/qa to trigger the respective deployment in the CI/CD tool.

@CameronWills
CameronWills / AzureBlobLog.cs
Last active October 5, 2016 23:09
A utility class to 'query' the application logs (System.Diagnostics.Trace) stored in Azure Blob storage - recursively descends log folder structure to find log files that match the requested date range and returns the nested log (.csv) files
/*
You will need to get install these two nuget libraries:
WindowsAzure.Storage
CsvHelper
*/
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@CameronWills
CameronWills / FormsPersistence.cs
Last active August 23, 2016 10:41
Persists and restores umbraco form files to and from the media IFileSystem storage (Amazon S3 or Azure Blob Storage)
/*
IMPORTANT:
To enable the persist operation, you need to add an AppSetting in your web.config file:
<add key="persistFormsOnChange" value="true" />
This should only be set to true on the Admin/BackOffice server.