Skip to content

Instantly share code, notes, and snippets.

@gulbanana
gulbanana / Icons.md
Last active August 29, 2015 14:03
Icons

The Archmage

Centuries ago, the Realm fractured into nations and stood on the brink of civil war. The One-Eyed King was poised to reconquer the world, kind of looking forward to it, truth be told. It’d been a long time since the flesh machines and war ghosts got a real outing. The Archmage stepped in to broker a compromise: the Federation, a body of sovereign civilised states.

The Federated Nations and Cities were mostly split on language and racial lines. The Federation was mostly dominated by the King’s land of Omen, apart from the elves in the North, but it sufficed for a time. The Archmage’s power and guidance held things together, until it didn’t.

The Archmage’s overriding goal is to stop the war and restore peace, but he’s busy with terrible arcane secrets - or, some say, dying. They also say that his Apprentice backs the Conqueror, and that the two wizards intrigue against each other, and you never know which one you’re really working for.

Relationships: It’s thanks to the Archmage that the D

@gulbanana
gulbanana / disposables.cs
Last active August 29, 2015 14:16
disposables
interface IFooRepository : IDisposable
{
Foo GetFoo();
}
interface IFooRepositoryFactory
{
IFooRepository Create(DisposableCollection disposables);
}
function shortest(graph)
{
var paths = [];
var counts = graph.map(_ => 0);
for (var startNode of graph.keys())
{
paths[startNode] = [];
var visited = [startNode];
@gulbanana
gulbanana / pr22
Last active August 9, 2016 06:47
using System;
using System.IO;
using System.Linq;
class Euler
{
static void Main(string[] args)
{
var raw_input = File.ReadAllText("./p022_names.txt");
var names = raw_input.Replace("\"","").Split(',').OrderBy(n => n);
using System;
using System.IO;
using System.Linq;
class Euler
{
static void Main(string[] args) => Console.WriteLine(
File.ReadAllText("./p022_names.txt")
.Replace("\"", "")
.Split(',')
using System;
using System.IO;
using System.Linq;
class Euler
{
static void Main(string[] args) => Console.WriteLine(
File.ReadAllText("./p022_names.txt")
.Replace("\"", "")
.Split(',')
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
class Euler
{
static void Main(string[] args) => Console.WriteLine(
File.ReadAllText("./p022_names.txt")
.Replace("\"", "")
using System;
class A {}
class B : A {}
class Badarray
{
static void Main(string[] args)
{
var x = new A[2];
using System;
interface IFoo
{
void Do();
}
class A : IFoo
{
public void Do() {}
}
@gulbanana
gulbanana / Program.cs
Last active August 10, 2016 02:19
pr15
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApplicationList
{
class Program
{
static IEnumerable<long> BuildLatticeRow(int size)
{