This file contains hidden or 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
$ClearString = "<yourString>" | |
$hasher = [System.Security.Cryptography.HashAlgorithm]::Create('sha256') | |
$hash = $hasher.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($ClearString)) | |
$hashString = [System.BitConverter]::ToString($hash) | |
$hashString.Replace('-', '').ToLower() |
This file contains hidden or 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.Drawing; | |
using System.Drawing.Imaging; | |
using System.Security.Cryptography; | |
using System.Text; | |
internal class Program | |
{ | |
private static RNGCryptoServiceProvider rngCsp = new RNGCryptoServiceProvider(); | |
private static void Main(string[] args) | |
{ |
This file contains hidden or 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.Drawing; | |
using System.Drawing.Imaging; | |
using System.Security.Cryptography; | |
internal class Program | |
{ | |
private static RNGCryptoServiceProvider rngCsp = new RNGCryptoServiceProvider(); | |
private static void Main(string[] args) | |
{ | |
for (int i = 0; i < 5; i++) |
This file contains hidden or 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
{ | |
"Id": "ActionTemplates-64", | |
"Name": "Replace Octopus Vars in Sitecore Configs", | |
"Description": "This Script searchs through all *.config files and replaces sc.variables and Sitecore settings with the value in Octopus of the same key.", | |
"ActionType": "Octopus.Script", | |
"Version": 16, | |
"Properties": { | |
"Octopus.Action.Script.Syntax": "PowerShell", | |
"Octopus.Action.Script.ScriptSource": "Inline", | |
"Octopus.Action.RunOnServer": "false", |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<Header> | |
<Title> | |
<!-- _locID_text="title" _locComment="" -->Agent</Title> | |
<Author>Daniel Scherrer</Author> | |
<Shortcut>sc_agent</Shortcut> | |
<Description> | |
<!-- _locID_text="description" _locComment="" -->Generates an Agent Entry</Description> | |
<SnippetTypes> |
This file contains hidden or 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
<?xml version="1.0"?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<accessRights defaultProvider="config"> | |
<rights> | |
<add patch:after="*[@name='field:write']" name="field:writeClone" comment="Write right for fields." title="Field Write for Clones" modifiesData="false" /> | |
<add patch:after="*[@name='item:write']" name="item:writeClone" comment="Write right for items." title="Write for Clones" modifiesData="false" /> | |
</rights> | |
</accessRights> |
This file contains hidden or 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.ComponentModel.DataAnnotations; | |
public class EventModel | |
{ | |
/// <summary> | |
/// Name of the page event to be registered. | |
/// </summary> | |
[Required] | |
public string EventName { get; set; } | |
/// <summary> |
This file contains hidden or 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
<# | |
.SYNOPSIS | |
Lists the items with broken external links in the current language. | |
.NOTES | |
Daniel Scherrer | |
Adapted from the Broken Links Checker Report by Michael West. | |
#> | |
$database = "master" |
This file contains hidden or 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
<?xml version="1.0"?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<pipelines> | |
<mvc.exception> | |
<!-- | |
The Global Exception Tentacle to avoid Yellow Pages of Death | |
If ShowExceptionsInPageEditor == true -> The system will throw an exception in the PageEditor | |
If ShowExceptionsInPreview == true -> The system will throw an exception in preview mode | |
If ShowExceptionsInDebugger == true -> The system will throw an exception in debbuger mode | |
--> |
This file contains hidden or 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 static void RegisterTypes(IWindsorContainer container) | |
{ | |
var rootPath = HostingEnvironment.MapPath("~/"); | |
var basePath = PathInfo.Combine(PathInfo.Create(rootPath), PathInfo.Create(ConfigurationManager.AppSettings["NitroNet.BasePath"])).ToString(); | |
new DefaultCastleWindsorModule(basePath).Configure(container); | |
} |
NewerOlder