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(Mandatory = $true)] | |
[string]$sourceDir, | |
[string]$branch = "master" | |
) | |
# bootstrap DNVM into this session. | |
&{$branch;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 |
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
{ | |
"projects": [ "src", "test" ], | |
"sdk": { | |
"version": "1.0.0-beta7", | |
"runtime": "clr" | |
} | |
} |
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(Mandatory = $true)] | |
[string]$websiteName, | |
[Parameter(Mandatory = $true)] | |
[string]$sourceDir, | |
[string]$destinationPath = "/site/wwwroot" | |
) | |
# Usage: .\kuduSiteUpload.ps1 -websiteName mySite -sourceDir C:\Temp\mydir |
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
//In Startup.cs file | |
services.AddMvc(config => | |
config.ModelBinderProviders.Insert(0, new NoNullStringModelBinderProvider()) | |
); | |
//model binder provider | |
public class NoNullStringModelBinderProvider : IModelBinderProvider | |
{ | |
public IModelBinder GetBinder(ModelBinderProviderContext context) | |
{ |
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 target = Argument("target", "Default"); | |
var configuration = Argument("Configuration", "Release"); | |
var port = Argument("Port", "5001"); | |
var installDirectory = "C:\\ProgramData\\chocolatey\\lib\\pretzel\\tools"; | |
var pretzelExe = installDirectory + "\\Pretzel.exe"; | |
public static void Replace(string file, string @this, string withThis) | |
{ | |
var config = System.IO.File.ReadAllText(file, Encoding.UTF8); |
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
branches: | |
only: | |
- source | |
environment: | |
access_token: | |
secure: ABC123... | |
# replace the above with your secure token | |
install: |
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
[Fact] | |
public void $Unit$_$Scenario$_$Expected$() | |
{ | |
$END$ | |
} |
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
[Fact] | |
public void $Unit$_$Scenario$_$Expected$() | |
{ | |
$END$ | |
} |
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"?> | |
<CodeSnippets | |
xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>XUnit Fact method</Title> | |
<Author>Devon Burriss</Author> | |
<Description>Creates a method that will run as an XUnit test (fact).</Description> | |
<Shortcut>fact</Shortcut> | |
</Header> |
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]$server = "http://defaultserver", | |
[Parameter(Mandatory=$true)][string]$domain | |
#[string]$password = $( Read-Host "Input password, please" ) | |
) | |
# assumes in folder you want solution | |
# assumes dotnet CLi is on the PATH | |
# global vars |
OlderNewer