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
namespace Client.Logic.Entities.Client.Pages.Blog | |
{ | |
using global::System; | |
using global::System.Collections.Generic; | |
using global::System.Linq; | |
using global::System.Text; | |
using FemtenNulOtte.Core.Entities; | |
using FemtenNulOtte.Core.Entities.Context; |
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.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace RecursiveFileSearch | |
{ | |
class Program |
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
SET NOCOUNT ON | |
SELECT '$(ServerName)' AS ServerName | |
,CAST( DB_NAME(mf.database_id) AS varchar) AS databaseName | |
,CAST(size_on_disk_bytes AS varchar(15)) as size_on_disk | |
,CAST(dbs.state_desc AS varchar(10)) as [state] | |
,CAST(dbs.recovery_model_desc AS varchar(10)) as rec_model | |
,CAST(dbusers.name AS varchar(10)) as [Owner] | |
,CAST(num_of_reads AS varchar(15)) as num_of_reads | |
,CAST(num_of_bytes_read AS varchar(15)) as num_of_bytes_read | |
,CAST(io_stall_read_ms AS varchar(15)) as io_stall_read_ms |
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 Sitecore.Data.Items; | |
using Sitecore.Data.Managers; | |
using Sitecore.Globalization; | |
using Sitecore.Pipelines.GetContentEditorWarnings; | |
namespace SitecoreExtensions.Pipelines.GetContentEditorWarnings |
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
-- Large blob data in test/uat environments is just wastefull use of disk space | |
SP_SPACEUSED [Blobs] | |
-- FINDING ItemIds FOR RELEVANT FIELDS | |
-- File > Information > Extension Field | |
select * from Items where ID like 'C06867FE-9A43-4C7D-B739-48780492D06F' | |
-- File > Media > Blob Field | |
select * from Items where ID like '40E50ED9-BA07-4702-992E-A912738D32DC' | |
-- Examining the data location of the fields |
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.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Web; | |
using System.Xml; | |
using Microsoft.Build.Framework; | |
using Microsoft.Build.Utilities; |
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
public class EnsureLanguageWriteAccess | |
{ | |
protected void OnItemSaving(object sender, EventArgs args) | |
{ | |
Item item = Event.ExtractParameter(args, 0) as Item; | |
Error.AssertNotNull(item, "No item in parameters"); | |
var itemlang = item.Database.GetItem(string.Format("/sitecore/system/Languages/{0}", item.Language)); | |
if (itemlang != null && Sitecore.Security.AccessControl.AuthorizationManager.IsDenied(itemlang | |
, Sitecore.Security.AccessControl.AccessRight.LanguageWrite |
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
/// <summary> | |
/// Class used to update Spot Context Data, when copying trees in Sitecore. | |
/// </summary> | |
public class LayoutDataSourceReferenceUpdater | |
{ | |
#region Properties | |
/// <summary> | |
/// Gets or sets the new root Item (source item). | |
/// </summary> |
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
/// <summary> | |
/// The layout data sources are saved with a text path and not a guid. | |
/// </summary> | |
public class EnsureDataSourceIsGUID | |
{ | |
public void OnItemSaving(object sender, EventArgs args) | |
{ | |
Sitecore.Diagnostics.Log.Info("Running EnsureDataSourceIsGUID", this); | |
Item item = Event.ExtractParameter(args, 0) as Item; | |
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
public class EnsureLanguageWriteAccess | |
{ | |
public int Limit | |
{ | |
get; | |
set; | |
} | |
public void Process(Sitecore.Pipelines.Save.SaveArgs args) | |
{ |