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 mapNpmCommand(command: string, packagesDevExact: string[], | |
packagesDevInexact: string[], packagesDepExact: string[], packagesDepInexact: string[], | |
packagesDepUn: string[], packagesDevUn: string[]): void { | |
const npmReduceRegex: RegExp = /npm\s+(i|un)\s+([\w\d\@\/\.-]+)\s+(-D|-S)?\s?(-E)?/gm; | |
const npmReduceMatch: RegExpExecArray | null = npmReduceRegex.exec(command); | |
const packageNameGroupId: number = 2; | |
const installCommandGroupId: number = 1; | |
const dependencyCategoryGroupId: number = 3; | |
const exactGroupId: number = 4; | |
if (npmReduceMatch) { |
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
git remote add downstream UrlOfImportedRepo | |
#foreach branch you want to bring back | |
git fetch downstream/branchname | |
git checkout branchname | |
git merge downstream/branchname #hopefully your history is not a mess and you don’t have conflicts to handle | |
git push origin | |
#end of foreach | |
git remote remove downstream |
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
ArgumentNullException\("(\w+)"\); | |
ArgumentNullException(nameof($1)); |
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([string]$connectionString) | |
&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))} | |
# load up the global.json so we can find the DNX version | |
$globalJson = Get-Content -Path $PSScriptRoot\global.json -Raw -ErrorAction Ignore | ConvertFrom-Json -ErrorAction Ignore | |
if($globalJson) | |
{ | |
$dnxVersion = $globalJson.sdk.version | |
} |
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.Data.Entity; | |
using Microsoft.Extensions.Configuration; | |
using Microsoft.Extensions.DependencyInjection; | |
namespace YourDbContextNameSpace | |
{ | |
public class Startupupdate | |
{ | |
public Startupupdate() | |
{ |
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
&{$Branch='dev';iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/dev/dnvminstall.ps1'))} | |
# load up the global.json so we can find the DNX version | |
$globalJson = Get-Content -Path $PSScriptRoot\global.json -Raw -ErrorAction Ignore | ConvertFrom-Json -ErrorAction Ignore | |
if($globalJson) | |
{ | |
$dnxVersion = $globalJson.sdk.version | |
} | |
else |
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($websiteName, $packOutput, $slot) | |
#fix for the script provided here https://msdn.microsoft.com/en-us/Library/vs/alm/Build/azure/deploy-aspnet5?f=255&MSPPError=-2147217396 | |
$website = $null; | |
$baseUrl = $websiteName; | |
if($slot -eq $null){ | |
$website = Get-AzureWebsite -Name $websiteName | |
} else { | |
$baseUrl += "-" + $slot | |
$website = Get-AzureWebsite -Name $websiteName -Slot $slot | |
} |
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([string]$targetPath) | |
$targetSearchPath = $targetPath+"\*" | |
remove-item $targetSearchPath -Recurse -include *.vspscc,*.vssscc -Verbose | |
$slnRegexPattern = 'GlobalSection\(TeamFoundationVersionControl\)[:\w\d\s\\.=\/{}-]*EndGlobalSection' | |
$slnFiles = get-childitem -Path $targetSearchPath -Recurse -Filter *.sln | |
foreach($slnFile in $slnFiles) | |
{ | |
$content = get-content $slnFile.FullName -Raw | |
if($content -match $slnRegexPattern) | |
{ |