git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
// Takes a credit card string value and returns true on valid number | |
function valid_credit_card(value) { | |
// Accept only digits, dashes or spaces | |
if (/[^0-9-\s]+/.test(value)) return false; | |
// The Luhn Algorithm. It's so pretty. | |
let nCheck = 0, bEven = false; | |
value = value.replace(/\D/g, ""); | |
for (var n = value.length - 1; n >= 0; n--) { |
// If using Unobtrusive Validation then that library initialised the Validate plugin | |
// on our behalf, so we missed the chance to set invalidHandler. Even if we were to | |
// set invalidHandler now via the settings object it would have no effect, due to the | |
// way that Validate works internally. Instead, we can do the following: | |
$("#MyForm").bind("invalid-form.validate", function () { | |
// Do something useful e.g. display the Validation Summary in a popup dialog | |
$("div.ValSummary").dialog({ | |
title: "Information", | |
modal: true, | |
resizable: false, |
// takes the form field value and returns true on valid number | |
function valid_credit_card(value) { | |
// The Luhn Algorithm. It's so pretty. | |
var nCheck = 0, bEven = false; | |
//this will remove all non-numeric characters and validate against remaining code. | |
//therefore this now supports 4111-1111-1111-1111 patterns as an example | |
value = value.replace(/\D/g, ""); | |
for (var n = value.length - 1; n >= 0; n--) { |
npm update -g
updates all global packages and their dependencies, see npm/npm#6247.
function Get-ConfigFileFilter([string]$providerName) | |
{ | |
return "^.*\." + $providerName + "\.(.+\.)?config.*$" | |
} | |
function Set-SCSearchProvider | |
{ | |
$rootPath = Read-Host "What is the path of your Sitecore instance's website folder?"; | |
$choice = Read-Host "(L)ucene or (S)olr?"; |
Param( | |
[string]$sourceRootPath | |
) | |
$paths=New-Object System.Collections.Generic.List[System.Object] | |
$paths.Add("C:\Program Files\nodejs") | |
$paths.Add("${HOME}\.dotnet\NuGetFallbackFolder") | |
$paths.Add("${HOME}\.nuget\packages") | |
$paths.Add("${HOME}\AppData\Local\Yarn") | |
$paths.Add("${HOME}\AppData\Roaming\npm") |
# Preface: | |
# dotnet tool install -g will return an error code when the tool is already installed in the system (at the same location) | |
# adding a test like below, will prevent the error | |
# this is mostly needed in a CI/CD environment where you don't want to break your pipeline if the tool was installed already. | |
# find if stryker is installed | |
$list = (dotnet tool list -g) | |
# echo the list | |
# $list |