View gist:07f931382fb66f377b0870d1a92ecb7b
using System; | |
using Sitecore.Analytics; | |
using Sitecore.Analytics.Model.Entities; | |
namespace MyNamespace.Repositories | |
{ | |
public interface IPaymentFacetRepository | |
{ | |
void SetFacentInformation(string userIdentifier, decimal lastPaymentAmount, DateTime lastPaymentDate); | |
} |
View gist:8a42c925b2909869cd71408d49057d19
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<model> | |
<elements> | |
<element interface="MyNamespace.Facet.IContactPortalInfo, MyNamespace" implementation="MyNamespace.Facet.ContactPortalInfo, MyNamespace"/> | |
</elements> | |
<entities> | |
<contact> | |
<facets> |
View gist:6bb33962d37843c182fb9f8b28e004b9
using Sitecore.Analytics.Model.Framework; | |
using System; | |
namespace MyNamespace.Facets | |
{ | |
public interface ICustomerPaymentFacet : IFacet | |
{ | |
decimal LastPaymentAmount { get; set; } | |
DateTime LastPaymentDate { get; set; } | |
} |
View gist:c6d37c2dd9d371df43787ddb54f6796e
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<settings> | |
<setting name="Login.BackgroundImageUrl"> | |
<patch:delete /> | |
</setting> | |
<setting name="Login.BackgroundImageUrl" value="/path/to/images/new_wallpaper_filename.jpg" /> | |
</settings> | |
</sitecore> | |
</configuration> |
View gist:ca214291fb3a7d2f048dd4205c321c25
background: url(/sitecore/login/drop_wallpaper.jpg) no-repeat center center fixed; | |
background-size: cover; |
View gist:5245252
!!! 5 | |
head | |
body | |
//- Currently this is the norm and works find | |
include path/to/partial | |
//- This is what I want to be able to do - provide the base directory from the route/rendering data. | |
include #{dir_from_route}/to/partial |
View timestamp.js
module.exports = function(){ | |
var date = new Date() | |
, year = date.getFullYear() | |
, month = date.getMonth() + 1 | |
, day = date.getDate() | |
, hours = date.getHours() | |
, minutes = date.getMinutes() | |
, seconds = date.getSeconds(); | |
if (month < 10) { month = "0" + month; } |
View Orientation.js
var OrientationManager = (function () { | |
"use strict"; | |
var supportsOrientationChange = window.hasOwnProperty("onorientationchange") | |
, orientationEvent = supportsOrientationChange ? "orientationchange" : "resize" | |
, currentOrientation = window.orientation || 0 | |
, currentWidth = window.outerWidth; | |
function orientationChanged(callBack) { | |
var newWidth = window.outerWidth |
View slide.js
function slide(element, value, duration, total) { | |
if (!total) { total = 0;} | |
if (total >= duration) {return;} | |
var startLocation = element.scrollLeft; | |
var totalDistance = Math.abs(value - startLocation); | |
var step = 25; | |
var direction = (startLocation < value) ? "left" : "right"; | |
var iteration = duration / step; | |
var iterationDistance = totalDistance / iteration; |
View AutoMapperIssue.cs
public class ObjectUnderTest | |
{ | |
private string _prefix; | |
public ObjectUnderTest(string prefix) | |
{ | |
_prefix = prefix; | |
} | |
public dto MapObject(obj input) |