Profile cover photo
Profile photo
Matt Wanchap
30 followers
30 followers
About
Posts

Post has attachment
Chrome forcing all localhost queries to https, breaking various CLIs
I use the Azure CLI and the Force.com CLI pretty regularly, and both of them make use of a little webserver running on localhost, presumably to catch the auth tokens once the SSO process redirects back. I also like to use localhost as a new tab page, to bet...
Add a comment...

Post has attachment
Docker + ASP.NET MVC "Hello world" - abridged edition
Here's the exact steps to get the ASP.NET MVC sample application running in a Docker container in Windows 10, abridged from the Microsoft tutorial here .  I used a fresh Azure VM to avoid the many weird issues I kept running into with my bizarrely-screwy de...
Add a comment...

Post has attachment
Get the date each branch in a git repo diverged from master
I'm trying to clean up some long-lived branches in our repo and came across this handy stackoverflow post to get branches by the date of the commit they branched from. I've modified it slightly to be easier to use for my purposes:  git show-ref | { while re...
Add a comment...

Post has attachment
Powershell jobs
Mostly for my own benefit but maybe someone will find this a helpful and concise reference Create a job like this $job = start-job {sleep 60; get-service;} If you're creating jobs in a loop, add them to an array $jobs = @() foreach ($asdf in $qwer) { $jobs ...
Add a comment...

Post has attachment
Azure Devops, unit tests and Azure AD Service Authentication
I couldn't think of a title for this one that wasn't ridiculously long so to help future Googlers, here's what we were trying to do: Authenticate against Azure Key Vault using a Service Principal using Azure AD Service Authentication Rrom our build server R...
Add a comment...

Post has attachment
Making EntityFramework play nice with Azure Key Vault
Make a separate class containing a constructor to pass in the connection string from KV.  Don't modify the constructor in the Whatever.Context.cs file because it'll get regenerated when you update the model and overwrite any changes you make in there. Get t...
Add a comment...

Post has attachment
Salesforce - bypass running unnecessary unit tests during a deployment
We had to urgently fix a bug in an Apex class written by a previous colleague, which was causing major issues with a customer-facing application on a Friday afternoon (because these things always happen then).  We'd found the bug and updated the code easily...
Add a comment...

Post has attachment
A non-useful Powershell snippet
What can I say, I was distracted $t = "Taste the rainbow "; $c = ([ConsoleColor].GetEnumNames()); (1..7) | % {$c += $c; $t += $t}; foreach($x in $c) { write-host $t -ForegroundColor $x -NoNewline; sleep -Milliseconds 50 }
Add a comment...

Post has attachment
Strongly-typed action links in ASP.NET Core MVC views
While experimenting with ASP.NET Core and Razor views it occurred to me that the magic-string-based links really weren't ideal, so I did a little googling and came across the excellent AspNet.Mvc.TypedRouting nuget package, which lets you use strongly-typed...
Add a comment...

Post has attachment
Using Application Insights with a .NET Core application
$appInsights = New-AzureRmApplicationInsights -Location USEast -ResourceGroupName rgname -Name ainame $appInsights.InstrumentationKey #copy this dotnet new mvc dotnet add package Microsoft.ApplicationInsights.AspNetCore In appsettings.json, add this {   "Ap...
Add a comment...
Wait while more posts are being loaded