Skip to content

Instantly share code, notes, and snippets.

Avatar

Alex Billson pielegacy

View GitHub Profile
View Configure By Example.md

Configure By Example

Learn the power of ASP.NET Core's Startup.Configure method with examples.

What is the Configure(IApplicationBuilder app, IHostingEnvironment env) method?

The Configure method in Startup.cs is essentially a fundamental part of Microsoft's OWIN implementation Katana. To sum up what OWIN and Katana are:

OWIN

@pielegacy
pielegacy / FrozenOakAPIDocs.md
Created Dec 27, 2017
Documentation for the Frozen Oak Locator API Endpoint @ https://www.frozenoak.com.au/
View FrozenOakAPIDocs.md

Frozen Oak API Documentation

Alex Billson (@pielegacy)

Preface

The Frozen Oak is a revolution in beverages and being the forward thinking company that Oak is it was only right that an associated Frozen Oak Locator was developed. This locator is powered by a versatile, simple,

@pielegacy
pielegacy / JS-LINQ.js
Last active Mar 19, 2018 — forked from DanDiplo/JS-LINQ.js
JavaScript equivalents of some common C# LINQ methods. To help me remember!
View JS-LINQ.js
// JS array equivalents to C# LINQ methods - by Dan B.
// Here's a simple array of "person" objects
var people = [
{ name: "John", age: 20 },
{ name: "Mary", age: 35 },
{ name: "Arthur", age: 78 },
{ name: "Mike", age: 27 },
{ name: "Judy", age: 42 },
{ name: "Tim", age: 8 }
View MonoGame Content Pipeline.md

How to work with MonoGame's Content Pipeline

With all the documentation you'll read for XNA, there will be one differentiating factor and that is the content pipeline.

The Content Pipeline can be a pain in the ass but it's overall very helpful as it nicely packages content for the game in the Content folder.

This tutorial will show you how to import a texture and load it in the game.

@pielegacy
pielegacy / angular-report.md
Created May 29, 2017
Power Up your Angular 1.x projects with Typescript, An explorative report by Alex Billson
View angular-report.md

Power Up your Angular 1.x projects with Typescript

An explorative report by Alex Billson

header

AngularJs for years has provided a very solid framework for creating scalable MVC (Model View Controller) and MVVM (Model View ViewModel) applications using HTML, CSS and JavaScript.

popularity

As shown in this graph from May 2016, newer versions of the framework such as Angular 2 and Angular 4 despite being more feature-full and efficient than its predecessors have still failed to

@pielegacy
pielegacy / MVC In The Web.md
Last active May 22, 2017
A basic overview of how we can use the MVC design pattern in our frontend web applications thanks to AngularJS
View MVC In The Web.md

MVC in The Web

The Model-View-Controller (also known as MVC) in many ways is the cornerstone of modern web application development. Through seperation of these three major aspects of an application we are able to ensure that our product is not only a solid user experience but a structured development experience as well. Before we get into what MVC is and how we can facilitate it in modern Web Application development, we need to ensure that we're up to scratch with our basic web technologies.

HTML, The Looks

View block-music-recommendations.md
@pielegacy
pielegacy / TomatosController.cs
Created Jan 16, 2017
The entire tomatos controller from my medium article
View TomatosController.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860
View testtomato.json
{
"Name" : "TestTomato",
"Origin" : "3095",
"Tastes" : "2"
}
View configure_snippet.cs
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
app.UseCors(options => options.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod().AllowCredentials());
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
app.UseMvc();
}
You can’t perform that action at this time.