View rewrite-dates.ps1
This file contains 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
$ErrorActionPreference = "Stop" | |
import-module mdbc | |
# | |
# Configuration Values | |
# | |
# The date you created the traffic which you wish to rewrite. Likely today. | |
$rewriteDate = Get-Date "9/8/2016" |
View create-package-script-from-xml.ps1
This file contains 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
Param ( | |
[Parameter(Mandatory=$True)] | |
[string]$PackageXml = $null, | |
[Parameter(Mandatory=$True)] | |
[string]$SitecoreUri = $null | |
) | |
Import-Module -Name SPE | |
set-alias out Write-Output |
View 0_reuse_code.js
This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View AllTemplatesField.cs
This file contains 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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Sitecore.ContentSearch; | |
using Sitecore.ContentSearch.ComputedFields; | |
using Sitecore.ContentSearch.Utilities; | |
using Sitecore.Data.Items; |
View ItemProviderScenarios.cs
This file contains 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
//ItemProvider works via GetItem override | |
Sitecore.Context.Database.Items[Sitecore.Data.ID.Parse("{110D559F-DEA5-42EA-9C1C-8A5DF7E70EF9}")].Children; | |
//ItemProvider works via GetChildren override | |
Sitecore.Data.Items.Item[] items = Sitecore.Context.Database.SelectItems("/sitecore/content/Home/*[@__isFolder='1']"); | |
//ItemProvider doesn’t work, never called | |
items = Sitecore.Context.Database.SelectItems("/sitecore/content/Home/*"); | |
//ItemProvider doesn’t work, never called |
View AllTemplatesField.cs
This file contains 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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Sitecore.ContentSearch; | |
using Sitecore.ContentSearch.ComputedFields; | |
using Sitecore.ContentSearch.Utilities; | |
using Sitecore.Data.Items; |
View html5example
This file contains 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
<video id="video-player" class="video-js vjs-default-skin" | |
controls preload="auto" width="640" height="360" | |
poster="poster.jpg" | |
data-setup=''> | |
<source src="test_01_720.webm" type='video/webm' /> | |
<source src="test_01_720.mp4" type='video/mp4' /> | |
</video> |