This file contains hidden or 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
| @powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://bit.ly/psChocInstall'))"; |
This file contains hidden or 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 mockTeamFoundationFeatureAvailabilityService = new Mock<ITeamFoundationFeatureAvailabilityService>(); | |
| var testable = new ApiFeatureAvailabilityController(x => mockTeamFoundationFeatureAvailabilityService.Object); | |
| var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:8080/path"); | |
| var config = new HttpConfiguration(); | |
| config.Routes.MapHttpRoute("FeatureAvailability", "path/{id}", new { Controller = "ApiFeatureAvailability", id = RouteParameter.Optional }); | |
| request.Properties[HttpPropertyKeys.HttpConfigurationKey] = config; | |
| request.Properties[HttpPropertyKeys.HttpRouteDataKey] = config.Routes.GetRouteData(request); | |
| testable.Url = new UrlHelper(request); | |
| testable.Request = request; |
This file contains hidden or 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
| //This is test setup | |
| var mockTeamFoundationFeatureAvailabilityService = new Mock<ITeamFoundationFeatureAvailabilityService>(); | |
| var testable = new ApiFeatureAvailabilityController(x => mockTeamFoundationFeatureAvailabilityService.Object); | |
| var request = new HttpRequestMessage(HttpMethod.Get, "http://localhost:8080/path"); | |
| var config = new HttpConfiguration(); | |
| config.Routes.MapHttpRoute("FeatureAvailability", "path/{id}", new { Controller = "ApiFeatureAvailability", id = RouteParameter.Optional }); | |
| request.Properties[HttpPropertyKeys.HttpConfigurationKey] = config; | |
| request.Properties[HttpPropertyKeys.HttpRouteDataKey] = config.Routes.GetRouteData(request); | |
| testable.Url = new UrlHelper(request); | |
| testable.Request = request; |
This file contains hidden or 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
| RequestReduce.Api.Registry.UrlTransformer = | |
| (context, , rrUrl) => { | |
| var uri = new Uri(rrUrl); | |
| if(uri.IsDefaultPort) {return rrUrl;} | |
| var builder = new UriBuilder(uri); | |
| builder.port = "80" //or whatever | |
| return builder.ToString(); | |
| }; |
This file contains hidden or 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
| #Get Boxstarter on RemotePC | |
| CINST Boxstarter.Chocolatey | |
| Import-Module Boxstarter.Chocolatey | |
| #Create minimal nuspec and chocolateyInstall | |
| New-BoxstarterPackage MyPackage | |
| #Edit Install script | |
| Notepad Join-Path $Boxstarter.LocalRepo "tools\ChocolateyInstall.ps1" | |
| #Pack nupkg | |
| Invoke-BoxstarterBuild MyPackage | |
| #share Repo |
This file contains hidden or 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
| Add-Type -AssemblyName System.IO.Compression.FileSystem,System.IO.Compression | |
| $here= (Get-Item .).FullName | |
| $archive = [System.IO.Compression.ZipFile]::Open( | |
| (Join-Path $here "archive.zip"), [System.IO.Compression.ZipArchiveMode]::Create | |
| ) | |
| get-tfsPendingChange | % { | |
| [System.IO.Compression.ZipFileExtensions]::CreateEntryFromFile( | |
| $archive, $_.LocalItem, $_.LocalItem.Substring($here.Length+1) | |
| ) | |
| } |
This file contains hidden or 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
| Import-Module "${env:ProgramFiles(x86)}\Microsoft Team Foundation Server 2012 Power Tools\Microsoft.TeamFoundation.PowerTools.PowerShell.dll" |
This file contains hidden or 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
| #setup IIS. you may want other IIS features but this is a basic example | |
| cinst IIS-WebServerRole -source windowsfeatures | |
| cinst IIS-HttpCompressionDynamic -source windowsfeatures | |
| cinst IIS-ManagementScriptingTools -source windowsfeatures | |
| cinst IIS-WindowsAuthentication -source windowsfeatures | |
| #I have never setup MSMQ. this turns on the server feature | |
| cinst MSMQ-Server -source windowsfeatures | |
| cinstm DotNet4.5 |
This file contains hidden or 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-ExecutionPolicy Unrestricted | |
| ble-blo | |
| cinstm 7zip.install | |
| Write-BoxstarterMessage 'Finished' |
This file contains hidden or 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
| cinst 7zip | |
| cinst winrar |
OlderNewer