Skip to content

Instantly share code, notes, and snippets.

@JJCLane
JJCLane / LeBlenderGridDataResolver.cs
Last active November 16, 2016 18:01
Updated LeBlender data resolver which works for multiple properties without duplicate serialization (credit to hfloyd & mattmorrisonsolidstudios)
using System;
using System.Collections.Generic;
using System.Linq;
using Lecoati.LeBlender.Extension.Models;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Newtonsoft.Json.Schema;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
@JJCLane
JJCLane / SimilarityDataResolver.cs
Created November 17, 2016 17:39
A simple data resolver for the Umbraco Similarity package
using System;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Umbraco.Courier.Core;
using Umbraco.Courier.Core.Logging;
using Umbraco.Courier.DataResolvers;
using Umbraco.Courier.ItemProviders;
using System.Collections.Generic;
namespace Project.BusinessLogic.Data_Resolvers
@JJCLane
JJCLane / _functions.scss
Created July 24, 2018 23:39
Calculate percentage column width for Masonry/Isotope
@function gridWidth($gutter, $numColumns) {
$totalSpace: ( $numColumns - 1 ) * $gutter;
@return calc((100% - #{$totalSpace}) / #{$numColumns});
}
@JJCLane
JJCLane / instructions.md
Last active January 28, 2019 09:36
Setting up CI for projects

Initial Setup

  • Copy .circleci folder from a previous project
  • Run composer require deployer/recipes --dev to install the required rysnc Deployer recipe
  • Copy deploy.php from the root directory of a previous project
  • Create a .env.testing file based on the .env.example but replace the following properties:
APP_ENV=testing
APP_DEBUG=true