Skip to content

Instantly share code, notes, and snippets.

View IEvangelist's full-sized avatar
:octocat:
Coding for a better world πŸ€“

David Pine IEvangelist

:octocat:
Coding for a better world πŸ€“
View GitHub Profile

Welcome to Cream City Code!

If you've attended any of the previous MKE DOT NET conferences, you are an official part of history. I know that you've learned something and you were inspired by keynote speakers Uncle Bob Martin, Scott Hanselman, and Maria Naggaga. We look forward to continuing to provide you with opportunities for inspiration and learning however, there is a new name for the long-standing technical conference that was once known as MKE DOT NET. Welcome to Cream City Code!

Horizontal Logo Image Here

Evolution

The MKE DOT NET technical conference has evolved! We've outgrown our original mindset and have adapted to community feedback. Our focus several years ago was solely on the .NET ecosystem. As evolution would have it, we’ve accepted more topics that have included modern techniques, skills, languages, platforms, frameworks, databases, outside-the-box concepts and best patterns/practices. We have essentially outgrown what we felt was a limiting name. Cream City Code broadens the topic

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Routing;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using Xunit;

WebAssembly: The New Endgame?

You may have heard of WebAssembly, like myself you probably asked "why"? Why have another way of doing web? Why introduce another standard or technology? In a world of technology saturation, what good can this do? All these questions will be answered in this session. We will explore Microsoft's experimental .NET web framework using C#/Razor and HTML that runs in the browser with WebAssembly. We will uncover the capabilities and limitations. We will see this in action and debug C# code in the web dev tools, and more. Is this the next major web innovation for the developer community? I hope you join me to find out.

Tuple Extensions

public static class TupleExtensions {
    public static async Task<T> TryAwaitOrLogAsync<T>(
        this (Task<T> task, ILogger logger) t,
        T defaultValue = default) {
        try {
            var result = await t.task;
            return result == default ? defaultValue : result;
@IEvangelist
IEvangelist / deconstructs.md
Last active August 30, 2018 18:29
Notice that there is no concern, no breaking changes whatsoever... Just additions.
public class Coordinates
{
    internal int X { get; }
    internal int Y { get; }
    internal int Z { get; }
    
    public Coordinates(int x, int y)
    {
 X = x;
@IEvangelist
IEvangelist / airport-distance-map.markdown
Created October 19, 2018 01:32
Airport Distance Map

Airport Distance Map

Get the distance between two airports "as the crow flies".

Built with SVG, Vue, D3, GSAP, and love.

One of the first pieces I made with Vue in 2016, now presented in an updated & cleaned up format.

A Pen by Shaw on CodePen.

This relies on the Newtonsoft.Json package. Once added as a package reference to your C# project, add the following class. This is an extension methods class, containing two convenience-centric extension methods:

using static Newtonsoft.Json.JsonConvert;

namespace IEvangelist.Extensions
{
    public static class ObjectExtensions
    {
        public static T FromJson<T>(this string json)
public static Dictionary<TKey, TElement> ToDistinctDictionary<TSource, TKey, TElement>(
this IEnumerable<TSource> source,
Func<TSource, TKey> keySelector,
Func<TSource, TElement> elementSelector,
IEqualityComparer<TKey> comparer)
{
if (source is null) throw new ArgumentNullException(nameof(source));
if (keySelector is null) throw new ArgumentNullException(nameof(keySelector));
if (elementSelector is null) throw new ArgumentNullException(nameof(elementSelector));
@IEvangelist
IEvangelist / emoji.md
Last active August 28, 2019 18:03 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning: