Skip to content

Instantly share code, notes, and snippets.

View alantsai's full-sized avatar

Alan Tsai alantsai

View GitHub Profile
@andy-uq
andy-uq / umbracoNodeTree.sql
Created February 2, 2012 21:16
Returns the umbraco node tree and all descendants
DECLARE @nodeId uniqueidentifier
SELECT @nodeId = 0 -- Put your node Id here
WITH NodeTree(ID, ParentID, [Level])
AS
(
-- The immediate Node we're getting (which will be excluded in the final query)
SELECT a.ID, a.ParentID, 0
FROM Node a
WHERE ID = @nodeId
@leekelleher
leekelleher / umbraco-find-nodes-by-property-value.sql
Last active October 3, 2017 14:10
Umbraco - Find nodes with specific property value
DECLARE @propertyAlias NVARCHAR(50);
DECLARE @search NVARCHAR(50);
SET @propertyAlias = 'bodyText';
SET @search = 'whatever';
SELECT
n.id,
n.path,
n.text
@trayburn
trayburn / A_ReadMe.md
Last active December 17, 2015 05:29
Powershell Scaffolding Example

PowerShell Scaffolding

Amir's RRYN Version (RRYN == Ruby Rake Yaml Nokogiri)

Setup

First, assuming you've not done a bunch of PowerShell before, lets get you setup with the minimums (in my opinion)

  • Set your execution policy, if you haven't already. You can choose Unrestricted if you prefer, RemoteSigned is a minimum for PSGet.
@clausjensen
clausjensen / DisableUmbracoNotifications.cs
Last active February 10, 2018 02:59
Disabling Umbraco notifications handler by reflection
public class MyUmbracoApplication : UmbracoApplication
{
protected override void OnApplicationStarted(object sender, EventArgs e)
{
base.OnApplicationStarted(sender, e);
// Make sure this is run after the base.OnApplicationStarted!
// The NotificationsHandler in Core is hooked up as a ApplicationEventHandler so we
// can't put this in a handler since we can't control the execution order.
DisableNotificationsHandler();
}