Enable CORS in .NET Core Web API

// Startup.cs

public void ConfigureServices(IServiceCollection services)
{
        // ...
        CorsConfig(services);
        // ...
}

public void Configure(IApplicationBuilder app, IApiVersionDescriptionProvider provider)
{
        // ...
        CorsConfig(app);        
        // ...
}

readonly string MyAllowSpecificOrigins = "_myAllowSpecificOrigins";
private void CorsConfig(IApplicationBuilder app)
{
    app.UseCors(MyAllowSpecificOrigins);
}
private void CorsConfig(IServiceCollection services)
{
    services.AddCors(options =>
    {
        options.AddPolicy(MyAllowSpecificOrigins,
        builder =>
        {
            builder.WithOrigins("http://localhost.com");
        });
    });
}

basic angular requirements

npm install --save -g @angular/core
npm install --save -g zone.js
npm install --save -g rxjs
npm install --save -g hammerjs
npm install --save -g @angular/cli

edit git commit details

git rebase -i 0abc12def // <- the commit before the one that needs edit
// use vi to change "pick" to "edit" on the commit(s) that need edits, then write/quit
git commit --amend --author="Christopher Snay <email@email.com>"
// write/quit vi
git rebase --continue // <- repeat until all edited commits complete
git push -f

Angular setup

ng new projectname
cd projectname
sudo npm install --save @angular/material @angular/cdk @angular/animations
npm install hammerjs
ng generate component componentname
ng generate service servicename

build stand-alone w/ relative path

ng build --prod --base-href ./

compare 2 files with Visual Studio

// open cmd
<<<path to Visual Studio\Common7\IDE>>>devenv /diff file1 file2

Or just create a batch file. Example:

@echo off
echo Drag and drop the first file onto this window. Then press [ENTER]
set /p file1=
echo Drag and drop the second file onto this window. Then press [ENTER]
set /p file2=
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /diff %file1% %file2%

ssh key generation

ssh-keygen
// copy contents from C:\Users\<<<me>>>\.ssh\id_rsa.pub
// paste contents to: https://bitbucket.org/account/user/<<<me>>>/ssh-keys/

ssh key generation to a specific directory

ssh-keygen -f C:\somepath\filename