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
| <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
| <sitecore> | |
| <powershell> | |
| <services> | |
| <mediaUpload> | |
| <patch:attribute name="enabled">true</patch:attribute> | |
| </mediaUpload> | |
| <fileDownload> | |
| <patch:attribute name="enabled">true</patch:attribute> | |
| </fileDownload> |
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
| function Remove-OldItemVersion { | |
| [CmdletBinding()] | |
| param( | |
| [Parameter(Position = 0,Mandatory = $true,ValueFromPipeline = $true)] | |
| [ValidateNotNullOrEmpty()] | |
| [Sitecore.Data.Items.Item]$Item, | |
| [Parameter(Position = 1,Mandatory = $true)] | |
| [ValidateNotNullOrEmpty()] | |
| [int]$MaxVersions | |
| ) |
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
| # | |
| # MongoDB (as a windows service) | |
| # | |
| $mongoDbPath = "$env:SystemDrive\MongoDB" | |
| $mongoDbConfigPath = "$mongoDbPath\mongod.cfg" | |
| $url = "https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-3.2.7.zip" | |
| $zipFile = "$mongoDbPath\mongo.zip" | |
| $unzippedFolderContent ="$mongoDbPath\mongodb-win32-x86_64-2008plus-3.2.7" | |
| if ((Test-Path -path $mongoDbPath) -eq $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
| function resolve(val) { | |
| alert('Counted to ' + val); | |
| return val; | |
| } | |
| function reject(reason) { | |
| alert('Could not count'); | |
| return reason; | |
| } |
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.Linq; | |
| using Isite.Sitecore.UI.WebControls; | |
| using Isite.Extensions; | |
| using System.Web.UI; | |
| using System.Threading.Tasks; | |
| using Sitecore.Data.Items; | |
| using System.Collections.Generic; | |
| using System.Threading; | |
| using Sitecore.Caching; | |
| using System.Diagnostics; |
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
| function archiveInbox() { | |
| var query = 'label:inbox is:read older_than:28d -label:unanswered -label:unread'; | |
| var batchSize = 100; | |
| while(GmailApp.search(query, 0, 1).length == 1) { | |
| GmailApp.moveThreadsToArchive(GmailApp.search(query, 0, batchSize)); | |
| } | |
| } |