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
$archiveDirectory = "" | |
$packageFilePath = "\PACKAGE\package.zip" | |
$parametersFilePath = "SampleWDP\TEST\parameters.xml" | |
$MSDeploy = "<C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe>" | |
& "$MSDeploy" -verb:sync -source:archiveDir="$archiveDirectory" -dest:package="$packageFilePath" -declareParamFile="$parametersFilePath" |
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
try | |
{ | |
$fs = [System.IO.FileStream]::New('c:\tempfiles\largefile.txt', [System.IO.FileMode]::Create, [System.IO.FileAccess]::Write, [System.IO.FileShare]::None) | |
$fs.SetLength(2 * 1024 * 1024 * 1024 -1) | |
} | |
finally | |
{ | |
if ($null -ne $fs -and $fs -is [System.IDisposable]) | |
{ |
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
private static bool CompareMemoryStreams(MemoryStream ms1, MemoryStream ms2) | |
{ | |
if (ms1.Length != ms2.Length) | |
return false; | |
ms1.Position = 0; | |
ms2.Position = 0; | |
var msArray1 = ms1.ToArray(); | |
var msArray2 = ms2.ToArray(); |
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
private bool CompareStreams(Stream a, Stream b) | |
{ | |
if (a == null && | |
b == null) | |
return true; | |
if (a == null || | |
b == null) | |
{ | |
throw new ArgumentNullException( | |
a == null ? "a" : "b"); |
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
export interface IStringTMap<T> { [key: string]: T; }; | |
export interface INumberTMap<T> { [key: number]: T; }; | |
export interface IStringAnyMap extends IStringTMap<any> {}; | |
export interface INumberAnyMap extends INumberTMap<any> {}; | |
export interface IStringStringMap extends IStringTMap<string> {}; | |
export interface INumberStringMap extends INumberTMap<string> {}; | |
export interface IStringNumberMap extends IStringTMap<number> {}; |
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 wp_postmeta AS wppostmeta | |
inner join wp_posts AS post | |
on post.ID = wppostmeta.post_id | |
set wppostmeta.meta_value = Round(wppostmeta.meta_value*1.03, 2) | |
where post.post_type = 'product' | |
and post_status = 'importlist' | |
and wppostmeta.meta_key = '_regular_price' |
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 wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_regular_price' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_sale_price' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2)WHERE meta_key = '_price' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_regular_price_tmp' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_sale_price_tmp' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_price_tmp' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_min_variation_price' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_max_variation_price' AND meta_value != '' | |
UPDATE wp_postmeta SET meta_value = Round(meta_value*1.02, 2) WHERE meta_key = '_min_va |
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
<location path="sitecore/shell/WebService"> | |
<system.web> | |
<authorization> | |
<allow users="?,*" /> | |
</authorization> | |
</system.web> | |
</location> |
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
FROM jeevan90/tiny-node-http-server | |
WORKDIR /app | |
COPY ./dist public |
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 http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8080; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), "public", uri); |