Skip to content

Instantly share code, notes, and snippets.

View tmamedbekov's full-sized avatar
🤠
alert( 'Howdy, world!' );

Tony Mamedbekov tmamedbekov

🤠
alert( 'Howdy, world!' );
View GitHub Profile
using System.Web;
using System.Web.Mvc;
using Sitecore.Mvc.Extensions;
namespace sitecore.local.Controllers
{
public static class Angular
{
public static IHtmlString RawJsEncodedString<T>(this HtmlHelper<T> htmlHelper, HtmlString str)
{
@using Sitecore.Mvc
@using Sitecore.Mvc.Extensions
@using sitecore.local.Controllers
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
@tmamedbekov
tmamedbekov / ItemMoving.config
Created June 6, 2017 15:00
Item Moving configuration that will patch the Sitecore.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<sitecore>
<scheduling>
<!--Custom Code that will do item moving-->
<agent type="sitecore.local.CustomCode.ItemMoving" method="Execute" interval="00:00:59"/>
</scheduling>
</sitecore>
</configuration>
@tmamedbekov
tmamedbekov / itemMoving.cs
Created June 6, 2017 14:55
Custom Code for Moving Item from one directory to another
using Sitecore.Configuration;
using Sitecore.Data.Items;
using Sitecore.Data;
using Sitecore.Data.Fields;
namespace sitecore.local.CustomCode
{
public class ItemMoving
{
private readonly Database _sourceDatabase = Factory.GetDatabase("master");
@tmamedbekov
tmamedbekov / app.get
Created January 13, 2017 21:55
Simple readdir with express server. NODE.JS
var express = require('express');
var fs = require('fs');
var app = express();
app.get('/logJson', function (req, res) {
const logsFolder = '/folder/path/';
fs.readdir(logsFolder, (err, files) => {
if (err) {