Skip to content

Instantly share code, notes, and snippets.

View JRondeau16's full-sized avatar

Jeffrey Rondeau JRondeau16

View GitHub Profile
@JRondeau16
JRondeau16 / gist:1724554
Created February 2, 2012 16:57
N queens Scheme
#lang racket
(define (iqueens L a d) ;; gives all of the queen solutions
(if (null? L)
(list a)
(append-map (λ(x)
(if(diagonal? x a 1)
'()
(iqueens (remove x L) (cons x a) 1))
)
L)))
@JRondeau16
JRondeau16 / gist:58c9f1a8d203822cd9b5
Last active August 29, 2015 14:13
Sitecore Scheduled Task Command Signature
public void Execute(Item[] items, Sitecore.Tasks.CommandItem command, Sitecore.Tasks.ScheduleItem schedule)
{
Sitecore.Diagnostics.Log.Info("My Sitecore scheduled task is being run!", this);
}
@JRondeau16
JRondeau16 / EmailAdministrator.cs
Last active October 8, 2015 13:09
Custom Workflow Email Action
using System.Net.Mail;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
using Sitecore.Workflows.Simple;
using Sitecore.Links;
namespace YOURPROJECTNAMESPACE
{
public class EmailAdmin
{
@JRondeau16
JRondeau16 / CustomCommand.config
Created March 12, 2015 19:27
Add Command Config
<configuration>
<sitecore>
<commands>
<command name="your:command" type="YourFullyQualifiedType,YourAssembly"/>
</commands>
</sitecore>
</configuration>
@JRondeau16
JRondeau16 / ExportToXml.cs
Last active August 29, 2015 14:16
Decompiled ExportToXml Command
using Sitecore;
using Sitecore.Data;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
using Sitecore.Form.Core.Configuration;
using Sitecore.Form.Core.DatViewer.Data;
using Sitecore.Form.Core.Pipelines.Export;
using Sitecore.Form.Core.Utility;
using Sitecore.Forms.Core.Commands;
using Sitecore.Forms.Core.Data;
@JRondeau16
JRondeau16 / ExportCommand.cs
Last active August 29, 2015 14:16
ExportCommand
using System;
using System.IO;
using System.Text;
using System.Web;
using Sitecore.Data.Items;
using Sitecore.Diagnostics;
using Sitecore.Form.Core.Configuration;
using Sitecore.Form.Core.Utility;
using Sitecore.Forms.Core.Commands.Export;
using Sitecore.IO;
using System;
using System.IO;
using System.Web;
using Sitecore.IO;
using Sitecore.Form.Core.Utility;
namespace MyProject
{
public partial class ExportBinary : System.Web.UI.Page
{
namespace MyProjectNamespace
{
public interface IInjectedClass
{
int TestMethod();
}
public class InjectedClass : IInjectedClass
{
public int TestMethod()
using System.Web.Mvc;
using Sitecore.Mvc.Controllers;
namespace MyProjectNamespace.Controllers
{
public class TestController : SitecoreController
{
private readonly IInjectedClass _injectedClass;
public TestController()
{
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<guide>
<InjectedClass type="MyProjectNamespace.InjectedClass, MyAssembly" />
</guide>
</sitecore>
</configuration>