Skip to content

Instantly share code, notes, and snippets.

View pielegacy's full-sized avatar

Alex Billson pielegacy

  • Mecca Brands
  • Melbourne, Australia
  • 03:29 (UTC -12:00)
View GitHub Profile
@pielegacy
pielegacy / VariousOpinionsOnProgramming.md
Last active January 7, 2024 06:59
Various opinions on programming

My Various Programming Opinions

These aren't supposed to be hot takes as most of these are pretty lukewarm and things that for the majority people follow anyway, thought it would be nice to have them all in one place.

Loops vs Functional Array Methods

I like to use loops where possible with functional array methods (not sure what the best terminology for it is but in JS it's stuff like map, reduce, filter and in C# it's Where, Select etc...).

The design of these array methods is to follow very standard functional programming concepts so methods such as a .ForEach where nothing is returned from these iterations always bug me.

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.

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();
}
@pielegacy
pielegacy / JS-LINQ.js
Last active March 19, 2018 03:39 — forked from DanDiplo/JS-LINQ.js
JavaScript equivalents of some common C# LINQ methods. To help me remember!
// 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 }

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:

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

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 / angular-report.md
Created May 29, 2017 12:44
Power Up your Angular 1.x projects with Typescript, An explorative report by Alex Billson

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 10:58
A basic overview of how we can use the MVC design pattern in our frontend web applications thanks to AngularJS

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

@pielegacy
pielegacy / Sandler Clan Ranking.md
Last active May 16, 2017 05:00
A ranking of the Sandler Clan members

Best Member

  1. Adam Sandler
  • The King
  • The OG
  • Billy Madison was good
  • Happy Gilmore was pretty good
  1. Chris Rock
  • Everybody Hates Chris > The Rest of the Material on this List
  1. Kevin James
  • Stellar filmography
@pielegacy
pielegacy / block-music-recommendations.md
Last active March 15, 2017 00:13
Great Chill Time Albums