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
ECHO MongoDB Installation | |
@ECHO OFF | |
set mongoVersion=3.2 | |
set mongoServiceName="MongoDB-%mongoVersion%" | |
set mongoDBFolder=C:\Data\MongoDB\%mongoVersion% | |
set mongoDBDataFolder=%mongoDBFolder%\Data | |
set mongoDBLogsFolder=%mongoDBFolder%\Logs | |
set mongoDBMongoD="C:\Program Files\MongoDB\Server\%mongoVersion%\bin\mongod.exe" |
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
@echo off | |
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a" | |
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%" | |
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%" | |
set "datestamp=%YYYY%%MM%%DD%" & set "timestamp=%HH%%Min%%Sec%" | |
set "fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%" | |
set "website=Website" | |
set "backupfolder=%website%_%fullstamp%" |
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.Collections.Specialized; | |
using System.Linq; | |
using System.Web; | |
public static class NameValueCollectionExtensions | |
{ | |
public static string ToQueryString(this NameValueCollection nvc) | |
{ | |
return string.Join("&", | |
nvc.AllKeys.Where(key => !string.IsNullOrWhiteSpace(nvc[key])) |
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
UPDATE | |
[aspnet_Membership] | |
SET | |
[Password]='qOvF8m8F2IcWMvfOBjJYHmfLABc=', | |
[PasswordSalt]='OM5gu45RQuJ76itRvkSPFw==', | |
[IsApproved] = '1', | |
[IsLockedOut] = '0' | |
WHERE | |
UserId IN ( | |
SELECT UserId FROM dbo.aspnet_Users WHERE UserName = 'sitecore\Admin' |
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.Data; | |
using Sitecore.Data.Items; | |
public static class ItemExtensions | |
{ | |
public static T GetValueAs<T>(this Item contextItem, ID settingFieldID) | |
{ | |
return (T)System.Convert.ChangeType(contextItem.Fields[settingFieldID].Value, typeof(T)); | |
} | |
} |
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
;SQL Server 2016 Configuration File | |
[OPTIONS] | |
; Specifies a Setup work flow, like INSTALL, UNINSTALL, or UPGRADE. This is a required parameter. | |
ACTION="Install" | |
; Specifies that SQL Server Setup should not display the privacy statement when ran from the command line. | |
SUPPRESSPRIVACYSTATEMENTNOTICE="False" |
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
# README | |
# This script will delete all deployments in an Azure resource group older than X Days | |
# You can use this script to count hom many deployments exist: Get-AzureRmResourceGroupDeployment -ResourceGroupName $resourceGroup | measure | |
# Variables | |
$subscriptionName = '{{azure subscription name}}' | |
$resourceGroupName = '{{azure resource group name}}' | |
$daysOldToDelete = -150 |
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
# Run this script in Sitecore Powershell Extensions | |
# It will delete the minifed files from master and publish the deletions to web | |
# Next time the site is visited they should be re-generated (if they aren't check your settings http://bit.ly/2TfrcfC) | |
# TODO: When publishing, there might be a better way to target folders in the media library instead of the hardcoded list | |
$masterItems = Get-Item -Path master: -Query "/sitecore/media library//*[@@key='optimized-min']" | |
$webItems = Get-Item -Path web: -Query "/sitecore/media library//*[@@key='optimized-min']" | |
Write-Host "Master Items: $($masterItems.length)" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<!-- choco install chocolatey-packages.config -y --> | |
<packages> | |
<!-- Windows Features --> | |
<package id="webdeploy" /> | |
<package id="urlrewrite" /> | |
<!-- Default Apps --> | |
<package id="googlechrome" /> | |
<package id="firefox" /> |
OlderNewer