This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var getDdlValue = function(selectedValue) { | |
return function(dataTypeResource) { | |
//it'd be nice to trade out the 1055 a dynamic value, but good nuff for now | |
return dataTypeResource.getPreValues("Umbraco.DropDown.Flexible", 1055).then(function (prevalues) { | |
var values = prevalues[1].value; | |
var actualValue = values[selectedValue[0]].value; | |
return actualValue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
cleanup = !git branch --merged master | grep -v '^[ *]*master$' | xargs -r git branch -d |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Newtonsoft.Json; | |
namespace Models | |
{ | |
public class NestedContentModel | |
{ | |
//not sure if we need this | |
[JsonProperty("name")] | |
public string Name { get; set; } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using Archetype.Models | |
@using Umbraco.Web | |
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage | |
@{ | |
var news = Model.Content.GetPropertyValue<ArchetypeModel>("myPropertyAlias").Take(5); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class AsyncHelper | |
{ | |
private static readonly TaskFactory TaskFactory = new | |
TaskFactory(CancellationToken.None, | |
TaskCreationOptions.None, | |
TaskContinuationOptions.None, | |
TaskScheduler.Default); | |
public static TResult RunSync<TResult>(Func<Task<TResult>> func) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Text; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Mvc.Html; | |
using Umbraco.Core.Logging; | |
using Umbraco.Core.Models; | |
namespace Foo | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
say "I don't know" | |
ask for more clarity | |
stay at home when you feel ill | |
say you don't understand | |
ask what acronyms stand for | |
ask why, and why not | |
forget things | |
introduce yourself | |
depend on the team | |
ask for help |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.sap a { | |
cursor: pointer; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
using Archetype.Models; | |
using Examine; | |
using Newtonsoft.Json; | |
using Umbraco.Core; | |
using Umbraco.Core.Logging; | |
namespace Demo.Core.Events | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var keywords = HttpContext.Current.Request.QueryString["q"]; | |
if (string.IsNullOrEmpty(keywords)) | |
{ | |
Response.Redirect("/"); | |
return; | |
} | |
var searcher = new SearchHelper(new SearchOnlyOwnSiteContentNoMediaStrategy()); | |
var results = searcher.Search(keywords).OrderByDescending(x => x.Score); |