Skip to content

Instantly share code, notes, and snippets.

@mikaelnet
mikaelnet / Sitecore-InvalidContentFieldData.sql
Last active November 2, 2022 00:47
Finds invalid content in the Sitecore database
DECLARE @SharedFieldId UniqueIdentifier = '{BE351A73-FCB0-4213-93FA-C302D8AB4F51}' /* Shared checkbox */
DECLARE @UnversionedFieldId UniqueIdentifier = '{39847666-389D-409B-95BD-F2016F11EED5}' /* unversioned checkbox */
DECLARE @TemplateFieldId UniqueIdentifier = '{455A3E98-A627-4B40-8035-E683A0331AC7}' /* Template field */
-- Find all templates WHERE both "Unversioned" AND "Shared" is selected:
-- "Shared" will have precedense, so the "Unversioned" checkbox can be removed
SELECT * FROM SharedFields
WHERE FieldId=@UnversionedFieldId AND [Value] = '1'
AND ItemId IN (SELECT ItemId FROM SharedFields WHERE FieldId=@SharedFieldId AND [Value]='1')
@lktslionel
lktslionel / How I Do PlantUML.md
Created September 30, 2019 08:02 — forked from jerieljan/How I Do PlantUML.md
PlantUML with Style -- How I do PlantUML

I use PlantUML a lot. It's what I use for drawing all sorts of diagrams and it's handy because of its easy markup (once you get used to it) while making things easy to maintain as projects grow (thanks to version control)

This gist details how I do my PlantUML workspace in a project.

  • The idea is to keep a globals directory for all diagrams to follow (like the "stylesheet" below) to keep things consistent.
  • The stylesheet.iuml file keeps the use of colors consistent through use of basic FOREGROUND, BACKGROUND and ACCENT colors.
  • The style-presets.iuml file defines these colors so you can make "presets" or "themes" out of them.
  • As stated in the stylesheet.iuml, you'll need the Roboto Condensed and Inconsolata fonts for these to work properly.
@AndyButland
AndyButland / HelixFitnessFunctionTests.cs
Created February 27, 2018 21:11
MSTest based Fitness Function for Verification of Sitecore Helix Architecture
namespace MySolution.FitnessFunctions
{
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Xml;
using FluentAssertions;
@michaellwest
michaellwest / TransferAssignedSecurityToAnotherRole.ps1
Created February 4, 2018 21:02
Finds items with a specified user or role assigned and transfers to another role in Sitecore PowerShell Extensions.
<#
.SYNOPSIS
Find all items with the specified user or role assigned.
.DESCRIPTION
This report helps identify all of the items with a specific user or role assigned and transfers to another role.
.NOTES
Michael West
#>
@JRondeau16
JRondeau16 / TabbedSelectRenderingForm.cs
Created July 28, 2017 18:36
Tabbed Select Rendering Form
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web.UI;
using Sitecore;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
using Sitecore.Shell.Applications.Dialogs.ItemLister;
using Sitecore.Web.UI.HtmlControls;
@JRondeau16
JRondeau16 / SelectRendering.xml
Created July 28, 2017 18:31
Select Rendering Dialogue
<?xml version="1.0" encoding="utf-8" ?>
<control xmlns:def="Definition" xmlns="http://schemas.sitecore.net/Visual-Studio-Intellisense">
<Sitecore.Shell.Applications.Dialogs.SelectRendering>
<FormDialog ID="Dialog" Icon="Core/32x32/open_document.png" Header="Open Item"
Text="Select the item that you wish to open. Then click the Open button." OKButton="Open">
<Stylesheet Src="SelectItemWithThumbnails.css" DeviceDependant="true" />
<CodeBeside Type="[YOUR_NAMESPACE].TabbedSelectRenderingForm, [YOUR_NAMESPACE]"/>
<DataContext ID="DataContext" Root="/"/>
@brunofarache
brunofarache / .travis.yml
Last active November 28, 2017 21:31
xamarin travis image proposal with default values
os: osx
language: xamarin
solution: solution-name
mono:
mdk: 4.6.2
android: 7.0.2-42
ios: 10.3.1.8
android:
@pbering
pbering / Logging.config
Last active August 13, 2016 10:18
Sitecore native UDP log streaming
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<log4net>
<appender name="UdpAppender" type="log4net.Appender.UdpAppender, Sitecore.Logging">
<remoteAddress value="127.0.0.1" />
<remotePort value="9000" />
<layout type="log4net.Layout.PatternLayout, Sitecore.Logging">
<conversionPattern value="%a @@@ %d{ABSOLUTE} @@@ %t @@@ %p @@@ %c @@@ %m" />
</layout>
</appender>
@swade1987
swade1987 / error
Last active March 13, 2019 11:59
docker swarm node user-data
time="2016-06-21T22:01:57.303122923Z" level=warning msg="/!\\ DON'T BIND ON ANY IP ADDRESS WITHOUT setting -tlsverify IF YOU DON'T KNOW WHAT YOU'RE DOING /!\\"
time="2016-06-21T22:01:57.304162692Z" level=info msg="New containerd process, pid: 1611\n"
time="2016-06-21T22:01:57Z" level=warning msg="containerd: low RLIMIT_NOFILE changing to max" current=1024 max=4096
time="2016-06-21T22:01:58.393886283Z" level=info msg="[graphdriver] using prior storage driver \"aufs\""
time="2016-06-21T22:01:58.399120918Z" level=info msg="Graph migration to content-addressability took 0.00 seconds"
time="2016-06-21T22:01:58.399405271Z" level=info msg="Initializing discovery without TLS"
time="2016-06-21T22:01:58.407245146Z" level=info msg="Firewalld running: false"
time="2016-06-21T22:01:58.578856202Z" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address"
time="2016-06-21T22:01:58.613650196Z" level=warning msg="Your kernel does not s
@sdgluck
sdgluck / ag-date-filter.js
Last active January 1, 2017 17:39
Simple HTML5 date filter for ag-grid. Requires: moment.js
'use strict';
var moment = require('moment');
var template = '' +
'<div class="ag-date-custom-filter">' +
' <select ng-model="queryType">' +
' <option value="exact">Exact</option>' +
' <option value="between">Between</option>' +
' </select>' +