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
| # These are project build parameters in TeamCity | |
| # Depending on the branch, we will use different major/minor versions | |
| [System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions") | |
| $ser = New-Object System.Web.Script.Serialization.JavaScriptSerializer | |
| $json = Get-Content "package.json" | Out-String | |
| $obj = $ser.DeserializeObject($json) | |
| $majorVerion = ($obj['version'] -split "\.")[0] | |
| $minorVerion = ($obj['version'] -split "\.")[1] | |
| $buildCounter = "%teamcity.build.counter%" | |
| $buildNumber = "$majorVerion.$minorVerion.$buildCounter" |
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
| # http://boxstarter.org/package/url? | |
| ##################### | |
| # BEGIN CONFIGURATION | |
| ##################### | |
| #region Initial Windows Config | |
| Install-WindowsUpdate -AcceptEula | |
| Update-ExecutionPolicy Unrestricted |
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
| #Basic Setup | |
| Install-WindowsUpdate -AcceptEula | |
| Update-ExecutionPolicy Unrestricted | |
| Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
| Enable-RemoteDesktop | |
| # Windows Features | |
| choco install Microsoft-Hyper-V-All -source windowsFeatures | |
| choco install IIS-WebServerRole -source windowsfeatures | |
| choco install IIS-HttpCompressionDynamic -source windowsfeatures |
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
| //http://stackoverflow.com/questions/13210663/how-to-order-knockout-bindings | |
| ko.bindingHandlers.chosen = { | |
| init: function(element, valueAccessor, allBindingsAccessor, viewModel) { | |
| var allBindings = allBindingsAccessor(); | |
| var options = {default: 'Select one...'}; | |
| $.extend(options, allBindings.chosen) | |
| $(element).attr('data-placeholder', options.default); |
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 {ValidationViewStrategy} from 'aurelia-validation/validation-view-strategy'; | |
| export class CustomValidationViewStrategyBase extends ValidationViewStrategy { | |
| constructor(containerClass, containerSuccessClass, containerErrorClass, appendClass, appendActiveClass) { | |
| super(); | |
| this.containerClass = containerClass; // The class for the container. | |
| this.containerErrorClass = containerErrorClass; // What's the error class for the container | |
| this.containerSuccessClass = containerSuccessClass; // What's the error class for the container | |
| this.appendClass = appendClass; // Where we're appending the message |
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
| public static class WebApiConfig | |
| { | |
| public static void Register(HttpConfiguration config) | |
| { | |
| config.Routes.MapHttpRoute( | |
| name: "DefaultApi", | |
| routeTemplate: "api/{controller}/{id}", | |
| defaults: new { id = RouteParameter.Optional } | |
| ); |
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
| public class HtmlFormatter : MediaTypeFormatter | |
| { | |
| public HtmlFormatter() | |
| { | |
| SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/html")); | |
| SupportedMediaTypes.Add(new MediaTypeHeaderValue("text/plain")); | |
| } | |
| protected override bool CanReadType(Type type) | |
| { |
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
| (function () { | |
| var re_leading_whitespace = /^\s+(?=[^\s])/g, | |
| re_is_whitespace = /^\s*$/, | |
| re_br = /<br ?\/?>/gi, | |
| re_blockquotes_for_html_fix = /^(\s*>)+/gm; | |
| function transform_markdown(html, text) { | |
| var | |
| // leading padding string, if found |
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
| <# | |
| .SYNOPSIS | |
| You can use this script to easly transform any XML file using XDT. | |
| To use this script you can just save it locally and execute it. The script | |
| will download it's dependencies automatically. | |
| #> | |
| [cmdletbinding()] | |
| param( | |
| [Parameter( | |
| Mandatory=$true, |
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
| function XmlDocTransform($xml, $xdt, $output) | |
| { | |
| if (!$xml -or !(Test-Path -path $xml -PathType Leaf)) { | |
| throw "File not found. $xml"; | |
| } | |
| if (!$xdt -or !(Test-Path -path $xdt -PathType Leaf)) { | |
| throw "File not found. $xdt"; | |
| } | |
| $transformDll = "" |
OlderNewer