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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", | |
"profiles": { | |
"defaults": { | |
"startingDirectory": "C:\\Source", | |
"snapOnInput": true, | |
"closeOnExit": true, | |
"historySize": 9001, | |
"colorScheme": "VS Code", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Side by Side</title> | |
<meta http-equiv="refresh" content="30" /> | |
<style> | |
html { | |
box-sizing: border-box; | |
} |
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
# bash completion | |
export BASH_COMPLETION_COMPAT_DIR="/usr/local/etc/bash_completion.d" | |
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh" | |
# nvm | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" | |
[ -s "/usr/local/opt/nvm/etc/bash_completion" ] && . "/usr/local/opt/nvm/etc/bash_completion" |
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 * as stream from "stream"; | |
import * as express from "express"; | |
import * as bodyParser from "body-parser"; | |
const app = express(); | |
app.use(bodyParser.raw()); | |
app.use(bodyParser.json()); | |
app.post("/upload", (req: express.Request, res: express.Response, next: express.NextFunction) => { |
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
using System; | |
using System.Diagnostics; | |
using Microsoft.Extensions.Logging; | |
namespace Microsoft.AspNetCore.Builder | |
{ | |
public static class SimpleLogger | |
{ | |
const string LOG_NAME = "MyProject.SimpleLogger"; | |
const string LOG_FORMAT = "{0} | {1}ms | {2} | {3} {4}"; |
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
using System; | |
namespace Microsoft.AspNet.Builder | |
{ | |
public static class HttpsEnforcer | |
{ | |
public static IApplicationBuilder UseHttpsEnforcer(this IApplicationBuilder app) | |
{ | |
Func<RequestDelegate, RequestDelegate> middleware = next => async context => | |
{ |
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
using System; | |
namespace Microsoft.AspNet.Builder | |
{ | |
public static class DomainEnforcer | |
{ | |
public static IApplicationBuilder UseDomainEnforcer(this IApplicationBuilder app, string domainToEnforce) | |
{ | |
if (string.IsNullOrEmpty(domainToEnforce)) | |
throw new ArgumentNullException(nameof(domainToEnforce)); |
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
:: The following variables are required: | |
SET AZDEPLOY_SOURCE=C:\Apps\myapp\dist | |
SET AZDEPLOY_APP=myapp | |
SET AZDEPLOY_PASSWORD=mypassword | |
:: The password can be extracted from the publish settings you download from the Azure portal | |
msdeploy.exe ^ | |
-verb:sync ^ | |
-source:contentPath="%AZDEPLOY_SOURCE%" ^ |
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
namespace Microsoft.AspNet.Builder | |
{ | |
public static class MediatRExtensions | |
{ | |
public static IServiceCollection AddMediatR(this IServiceCollection services, params Assembly[] handlerAssemblies) | |
{ | |
services.AddTransient<IMediator>(x => new Mediator(x.GetService<SingleInstanceFactory>(), x.GetService<MultiInstanceFactory>())); | |
services.AddTransient<SingleInstanceFactory>(x => t => x.GetRequiredService(t)); | |
services.AddTransient<MultiInstanceFactory>(x => t => x.GetServices(t)); |
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
choco install notepad2-mod | |
choco install conemu | |
choco install 7zip | |
choco install googlechrome | |
choco install kdiff3 | |
choco install gitextensions | |
choco install git-credential-winstore | |
choco install nodejs | |
choco install visualstudiocode |
NewerOlder