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
services: | |
mssql: | |
image: mcr.microsoft.com/azure-sql-edge/developer | |
hostname: mssql | |
container_name: mssql | |
user: root | |
restart: always | |
environment: | |
ACCEPT_EULA: "Y" |
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
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory = $false)] | |
[hashtable]$WatchDirectoryParameters | |
) | |
# Setup | |
$ErrorActionPreference = "Stop" | |
$InformationPreference = "Continue" | |
$timeFormat = "HH:mm:ss:fff" |
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
# escape=` | |
ARG BUILD_IMAGE | |
FROM ${BUILD_IMAGE} | |
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] | |
RUN Set-ExecutionPolicy RemoteSigned -Force; Set-ExecutionPolicy Unrestricted -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
RUN choco install docker -y |
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
param( | |
[Parameter()] | |
[switch]$NoBuild, | |
[Parameter()] | |
[switch]$NoSync, | |
[Parameter()] | |
[string]$CmHost="https://habitatstarterkit.local", | |
[Parameter()] | |
[string]$SolutionName="HabitatStarterKit.sln", | |
[Parameter()] |
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
- Create your VM as normal, get Windows installed and so on | |
- Power the VM down, to "Off" state | |
- On the HOST pc, execute the following 2 commands from an elevated Powershell prompt | |
Set-VMProcessor -VMName "Name of your VM" -ExposeVirtualizationExtensions $true | |
Get-VMNetworkAdapter -VMName "Name of your VM" | Set-VMNetworkAdapter -MacAddressSpoofing On | |
- Start up the VM again | |
- Inside the VM, execute the following command from an elevated Powershell prompt |
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 set up Unicorn in your Docker container | |
Since all writing to Unicorn files happens inside the container, and the container is now linked to .\unicorn, | |
all you need to do is ensure that .\unicorn is included under source control. | |
This gets even better if you use Transparent Sync. |
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
var rename = require('gulp-rename'); | |
var replace = require('gulp-replace'); | |
... | |
gulp.task("B04-Sync-Unicorn", | |
function(callback) { | |
console.log("Executing Unicorn Sync"); | |
gulp.src([path.resolve(config.websiteRoot + '/App_Config/Include/zzz/Unicorn.TargetDataStore.config.EDITME')]) |
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
module.exports = function () { | |
var config = { | |
websiteRoot: "C:\\inetpub\\wwwroot\\sc911.sc", | |
sitecoreLibraries: "C:\\inetpub\\wwwroot\\sc911.sc\\bin", | |
hostName: "http://sc911.sc", | |
solutionName: "sc911", | |
buildConfiguration: "Debug", | |
runCleanBuilds: false, | |
toolsVersion: "16.0" | |
} |
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
Param( | |
$installFolder = "c:\solr", | |
$solrPort = "8721", | |
$solrHost = "solr", | |
$solrSSL = $true, | |
$downloadFolder = "$PSScriptRoot" | |
) | |
$solrVersion = "7.2.1" | |
$solrName = "solr-$solrVersion" |
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
public virtual Tuple<string, string> GetAdaptiveImageUrls(Item item, string imageFieldName, int maxWidth = 300) | |
{ | |
Assert.IsNotNull(item, nameof(item)); | |
Assert.IsNotNullOrEmpty(imageFieldName, nameof(imageFieldName)); | |
ImageField imageField = item.Fields[imageFieldName]; | |
if (imageField?.MediaItem != null /*&& imageField.MediaItem.Versions.Count > 0*/) | |
{ | |
string imageUrl = HashingUtils.ProtectAssetUrl(MediaManager.GetMediaUrl(imageField.MediaItem, new MediaUrlOptions {MaxWidth = maxWidth})); |
NewerOlder