Skip to content

Instantly share code, notes, and snippets.

View tenfortyeight's full-sized avatar

John Magnusson tenfortyeight

  • Aptitud
  • Stockholm, Sweden
View GitHub Profile

Keybase proof

I hereby claim:

  • I am tenfortyeight on github.
  • I am jmag (https://keybase.io/jmag) on keybase.
  • I have a public key ASDdAaC2PwiV-PhXcIUCjs1UxG9tMwUDvTtNYRdp8gMJBwo

To claim this, I am signing this object:

@tenfortyeight
tenfortyeight / index.html
Last active February 14, 2017 17:30
how to create a graph displaying your microservices. We have a name convention for {domain}-{application} so we split the name on dash, and each domain gets a color of its own for the respective nodes.
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.18.1/vis.min.js"></script>
<style>
body {
background-color: #000;
}
</style>
</head>
@tenfortyeight
tenfortyeight / gist:10e27ca909503d53dcc8
Created September 19, 2014 14:52
property overwriting
using System;
public abstract class MyBase {
protected MyBase(){}
protected MyBase(Guid id, string name){
Id = id;
Name = name;
}
public Guid Id {get;private set;}
@tenfortyeight
tenfortyeight / gist:7462857
Created November 14, 2013 07:32
How come that the first version doesn't work, but the other do? I am missing something in all the dynamics...
//Version 1 - Don't work
public IEnumerable<string> GetAll()
{
var dataHistory = tbl.All(); //Massive, returns a dynamic object
var history = Deserialize(dataHistory);
return history;
}
private IEnumerable<string> Deserialize(dynamic dataHistory)