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
##################### | |
# PREREQUISITES | |
##################### | |
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
##################### | |
# SOFTWARE | |
##################### |
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
$backupRoot = Get-ChildItem -Path "C:\backup" | |
$datafilesDest = "c:\databases" | |
$logfilesDest = "c:\databases" | |
$server = ".\SQL17" | |
## For each folder in the backup root directory... | |
# | |
foreach($folder in $backupRoot) | |
{ | |
# Get the most recent .bak files for all databases... |
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 Sitecore.ContentSearch.Linq; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Web; | |
using System.Collections.Specialized; | |
namespace MyProject | |
{ |
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 Microsoft.WindowsAzure.Storage; | |
using Microsoft.WindowsAzure.Storage.Blob; | |
using Microsoft.WindowsAzure.Storage.RetryPolicies; | |
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using System.Web; | |
namespace Acme.Web.Services |
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 Microsoft.WindowsAzure.Storage; | |
using Microsoft.WindowsAzure.Storage.Blob; | |
using Microsoft.WindowsAzure.Storage.RetryPolicies; | |
using System; | |
using System.Configuration; | |
using System.IO; | |
using System.Linq; | |
using System.Web; | |
namespace Acme.Web.Services |
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
//how to mock an HttpRequest for testing a controller | |
var mockHttpContext = new Mock<HttpContextBase>(); | |
var mockRequest = new Mock<HttpRequestBase>(); | |
mockRequest.Setup(x => x.QueryString).Returns(new NameValueCollection() {}); | |
mockHttpContext.Setup(x => x.Request).Returns(mockRequest.Object); | |
_rssFeedPageController = new RssFeedPageController(contentRepositoryMock.Object, serviceFactoryMock.Object, extractionMock.Object, htmlStripMock.Object, "http://dev.mywebsite.co.uk"); | |
_rssFeedPageController.ControllerContext = new ControllerContext(mockHttpContext.Object, new RouteData(), _rssFeedPageController); |
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 System.Threading.Tasks; | |
namespace ConsoleApp1 | |
{ | |
//Given an array of integers, return a new array such that each element at index i of the new array |
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
# Allow reboots | |
$Boxstarter.RebootOk=$true | |
$Boxstarter.NoPassword=$false | |
$Boxstarter.AutoLogin=$true | |
# Basic setup | |
#Update-ExecutionPolicy Unrestricted | |
#Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
#Enable-RemoteDesktop | |
#Disable-InternetExplorerESC |