Skip to content

Instantly share code, notes, and snippets.

View allanchua101's full-sized avatar
👹
Coding and grinding

Allan Chua allanchua101

👹
Coding and grinding
View GitHub Profile
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace TreeshakingDemo
// This method gets called by the runtime.
// Use this method to add services to the container.
// For more information on how to configure your application,
// visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc();
}
// This method gets called by the runtime.
@allanchua101
allanchua101 / NPM Initializer Script
Last active February 26, 2018 12:53
Code for initializing package.json file
// The code below will generate a package.json file.
npm init -y
@allanchua101
allanchua101 / NPM Installer
Created February 26, 2018 12:56
This will install the latest official, tested version of npm.
// This will install the latest official, tested version of npm.
// Run this script one at a time.
npm install npm
npm install npm@latest
@allanchua101
allanchua101 / Webpack Installer
Created February 26, 2018 12:59
CLI command for installing Webpack for development / debug environment
// Script for installing Webpack on your app folder
// This snippet installs webpack on the debug environment.
npm install webpack --save-dev
@allanchua101
allanchua101 / Node Typescript Installer
Created February 26, 2018 13:01
Script used for installing Typescript and it's Webpack loader
npm install --save-dev typescript ts-loader
@allanchua101
allanchua101 / Disable_TypeScript_Compile_VS2017.xml
Created February 26, 2018 13:04
Code for disabling Native compilation of CS projects for TypeScript on Visual Studio 2017
<PropertyGroup>
<TypeScriptCompileOnSaveEnabled>False</TypeScriptCompileOnSaveEnabled>
</PropertyGroup>
@allanchua101
allanchua101 / Run HTTP 2.0 Test.sh
Last active July 4, 2018 15:23
Script used to start HTTP 2.0 server test
npm install
npm run server
@allanchua101
allanchua101 / initialize npm.sh
Last active August 10, 2018 15:26
Initializing an NPM project.
# This script will initialize
# an NPM project on the
# folder you created
npm init -y
@allanchua101
allanchua101 / Install Express Generator.sh
Created August 10, 2018 15:29
Script for installing express generator.
# This shell script will install
# an express generator cli on your
# machine.
npm install express-generator -g