Skip to content

Instantly share code, notes, and snippets.

View natemcmaster's full-sized avatar

Nate McMaster natemcmaster

View GitHub Profile
@natemcmaster
natemcmaster / README.md
Created September 1, 2016 18:58
Echo command line args

Compile in Developer Command Prompt for VS 2015

PS> cl echo.c 
@natemcmaster
natemcmaster / README.md
Last active July 8, 2016 15:32
ALC versions

Consider this following example:

An implementation of ALC is setup to load CommonAssembly, Version=2.0.0.0, InformationalVersion=2.0.0-beta.

The host in an app that this on the TPA: CommonAssembly, Version=2.0.0.0, InformationalVersion = 2.0.0-alpha.

// in a test app that depends on CommonAssembly "2.0.0-alpha"
public class HostProgram
{
@natemcmaster
natemcmaster / Program.cs
Last active August 29, 2017 16:37
CustomCandidateNamingService
using System;
using Microsoft.EntityFrameworkCore.Scaffolding.Internal;
using Microsoft.Extensions.DependencyInjection;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
@natemcmaster
natemcmaster / README.md
Created June 18, 2016 22:55
ASP.NET Core Directories

Development-time

src/
  Web/  <-- Microsoft.AspNetCore.Hosting.IHostingEnvironment.ContentRootPath, System.IO.Directory.GetCurrentDirectory()

    project.json
    web.config
    
    wwwroot/ <--  Microsoft.AspNetCore.Hosting.IHostingEnvironment.WebRootPath
 app.js
@natemcmaster
natemcmaster / Program.cs
Created June 18, 2016 19:00
Saving/reading guid as string
using System;
using Microsoft.Data.Sqlite;
using static System.Console;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
@natemcmaster
natemcmaster / preview_vnext.md
Last active June 1, 2016 00:33
EF design time tools

How EF design-time tooling will work

Package structure

Microsoft.EntityFrameworkCore.Tools
├── lib
│   ├── netcoreapp1.0
│   |   └── dotnet-ef.dll
|   ├── net451

Preview 1: How EF design-time tooling works

Package structure

Microsoft.EntityFrameworkCore.Tools
├── lib
│   ├── net451
│   │   └── Microsoft.EntityFrameworkCore.Tools.dll <-- PowerShell OperationExecutor is here
@natemcmaster
natemcmaster / runtime.json
Created May 19, 2016 07:04
Microsoft.NETCore.Platforms
{
"runtimes": {
"base": {},
"any": {
"#import": ["base"]
},
"win": {
"#import": ["any"]
@natemcmaster
natemcmaster / clear-nuget.cmd
Last active June 22, 2016 18:32
Clear NuGet
REM npm i -g rimraf
REM https://github.com/isaacs/rimraf
rimraf %USERPROFILE%\.nuget\ %LOCALAPPDATA%\NuGet\v3-cache\ %LOCALAPPDATA%\NuGet\Cache\
<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" xmlns:ns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:ns2="http://schemas.microsoft.com/appx/2013/manifest"><head><title>Windows App Certification Kit - Test Results</title><style type="text/css">
BODY, TH, TD { font-family: Segoe UI; font-size: 10.5pt; color: #2a2a2a; margin: 0 18pt; padding: 0; }
.titleLarge { margin-top: 9pt; font-family: Segoe UI Light; font-size: 25pt; font-weight: normal; }
.titleItem { font-family: Segoe UI Light; font-weight: bold; font-size: 15pt; margin: 0 5pt 0 5pt; }
.overall { font-size: 20pt; font-weight: bold; }
.overall p { margin: 3pt; font-size: 10.5pt; font-weight: normal; }
.ulMessagesOverflow { list-style-type: circle; background-color: #cccccc; border-color: black; height: 150px; overflow-y: scroll;overflow-x: hidden;}
.ulMessagesNoOverflow { list-style-type: circle; background-color: #cccccc; border-color: black;}
ul.ulMessag