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
public readonly struct EnumerableRange : IEnumerable<int>
{
readonly Range _range;
public EnumerableRange(Range range)
{
if (range.Start.IsFromEnd || range.End.IsFromEnd)
{
throw new ArgumentException(nameof(range));
}

Structured show:

  • 5 minutes ".NET check up"
    • Doc Rx
    • Let us perscribe you this doc, learn module, or blog post... or
    • Codeoligest
  • 5 minutes opening, intros
  • 45 hallway track with guest
  • 5 minutes closing

πŸ‘¨πŸΏβ€πŸ’» πŸ‘©πŸΏβ€πŸ’» πŸ‘¨πŸΎβ€πŸ’» πŸ‘©πŸΎβ€πŸ’» πŸ‘¨πŸ½β€πŸ’» πŸ‘©πŸ½β€πŸ’» πŸ‘¨πŸΌβ€πŸ’» πŸ‘©πŸΌβ€πŸ’» πŸ‘¨πŸ»β€πŸ’» πŸ‘©πŸ»β€πŸ’»

public void Write(object o)
{
if (o ! is string)
{
Console.WriteLine("WTF?");
}
else
{
Console.WriteLine("OMG!");
}

Visual Studio Code: Authoring extensions

In less than five years, Visual Studio Code (VS Code) has become the most popular integrated development environment (IDE) in the world. It's built with love and in the open on GitHub, and runs on Chromium (a tip of the hat to Google). VS code is extendable and in this talk we'll cover how to author your very own extension.

You can expect to learn how to:

  • Debug your extension
  • Target specific languages
  • Expose settings to users
  • Provide statement completion
  • Handle user interactions
@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:
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));

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)
@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.

@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;