Skip to content

Instantly share code, notes, and snippets.

techphoria414

Block or report user

Report or block techphoria414

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@techphoria414
techphoria414 / rewrite-dates.ps1
Last active Sep 9, 2016
Rewrite interaction dates in Sitecore analytics database
View rewrite-dates.ps1
$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"
@techphoria414
techphoria414 / create-package-script-from-xml.ps1
Last active Aug 29, 2015
Script to take a Sitecore Package XML definition and output a Sitecore Powershell Extensions script to replace it.
View create-package-script-from-xml.ps1
Param (
[Parameter(Mandatory=$True)]
[string]$PackageXml = $null,
[Parameter(Mandatory=$True)]
[string]$SitecoreUri = $null
)
Import-Module -Name SPE
set-alias out Write-Output
@techphoria414
techphoria414 / 0_reuse_code.js
Created Mar 13, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@techphoria414
techphoria414 / AllTemplatesField.cs
Last active Dec 15, 2017
A couple Sitecore 7 computed fields
View AllTemplatesField.cs
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;
@techphoria414
techphoria414 / ItemProviderScenarios.cs
Created Nov 16, 2013
Sitecore ItemProvider does not provide 100% coverage for manipulating data behavior. You potentially need to implement both an ItemProvider and a GetItemCommand, or just the latter.
View ItemProviderScenarios.cs
//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
@techphoria414
techphoria414 / AllTemplatesField.cs
Last active Dec 27, 2015
Sitecore7 computed index field for *really* indexing all base templates (up to the Standard Template)
View AllTemplatesField.cs
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;
@techphoria414
techphoria414 / html5example
Last active Dec 22, 2015
HTML5 Video Tag with mp4 and webm
View html5example
<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>
You can’t perform that action at this time.