Chocolatey machine setup

https://gist.github.com/chrismckelt/3884f94078a7bd3a773b   #Administrator privileges check If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(` [Security.Principal.WindowsBuiltInRole] “Administrator“)) { Write–Warning “You do not have Administrator rights!`nPlease run the build shell as administrator!“ exit } $scriptPath = $MyInvocation.MyCommand.Path $scriptDirectory = Split–Path $scriptPath $customDir […]

GreaseMonkey script to auto login on an Angular app

angular.element(document).ready(function () { var $scope = angular.element(document.getElementById(‘username‘)) .scope() if (window.location.href.toString().indexOf(‘#/admin/signin‘) !== –1) { console.log(‘auto-login enabled admin‘); $scope.$apply(function () { // perform any model changes or method invocations here on angular app. $scope.Username = ‘adminusername‘; $scope.Password […]

XUnit Ignore test at runtime (with SpecFlow tag @IgnoreLocally)

XUnit Ignore test at runtime (with SpecFlow tag @IgnoreLocally) Code –> https://github.com/chrismckelt/XUnit.OptionallyIgnore NuGet –> https://www.nuget.org/packages/Xunit.SpecFlow.AssertSkip/ As Xunit has no Assert.Ignore() using the OptionallyIgnoreTestFactAttribute attribute on a method and setting McKeltCustom.SpecflowPlugin.Settings.IgnoreLocally == true will ignore the test […]