Skip to content

Instantly share code, notes, and snippets.

View mike-kilo's full-sized avatar

Mike K mike-kilo

  • Maastricht, the Netherlands
View GitHub Profile
@mike-kilo
mike-kilo / suuntoapp2gpx
Last active February 2, 2020 15:09 — forked from mrvdb/suuntoapp2gpx
#!/usr/bin/env python
# -*- mode:python -*-
#
# Converts suunto zip files (which contain json files) to a gpx file
# until Suunto gets their act together and let me have my own data in
# a normal way.
# Needs: python 3.7
#
# These zip files are producted by the Suunto app and typically on
# android are located at:
@mike-kilo
mike-kilo / BrowseFolderDialog.cs
Created September 2, 2020 12:26
Browse folder dialog [C#/.NET]
using System.IO;
using System.Windows;
namespace Snippets
{
public static class BrowseFolderDialog
{
public static string Show(Window owner, string caption, string startingLocation, bool withFileName)
{
string result = string.Empty;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Helpers
{
public struct Range<T> where T : IComparable
{
public T Start { get; set; }
@mike-kilo
mike-kilo / Either.cs
Created March 23, 2021 10:06
Either - like in F#
using System;
namespace Helpers
{
public class Either<TL, TR>
{
private readonly TL left;
private readonly TR right;
private readonly bool isLeft;