Skip to content

Instantly share code, notes, and snippets.

View cstanfill's full-sized avatar

Colin Stanfill cstanfill

View GitHub Profile
@cstanfill
cstanfill / gist:a476c360485547299eeb
Created July 12, 2015 17:39
haskell tuple nth functions
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE FlexibleInstances #-}
class First a b | b -> a where
first' :: b -> a
class Second a b | b -> a where
second' :: b -> a
instance First a ((,) a b) where
@cstanfill
cstanfill / keybase.md
Created March 31, 2015 06:13
Keybase identity

Keybase proof

I hereby claim:

  • I am cstanfill on github.
  • I am stanfillco (https://keybase.io/stanfillco) on keybase.
  • I have a public key whose fingerprint is EC2E 7D87 A86E 4616 50F0 28B2 20B8 3861 2644 DD12

To claim this, I am signing this object:

@cstanfill
cstanfill / BivariantArrays.cs
Created November 18, 2014 23:09
Typesafe bivariant arrays in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BivariantArrays
{
public interface IReadable<in T>
{
#!/bin/bash
# makes `man git pull` & company do the thing you always want and not the stupid thing nobody has ever wanted
OLDIFS=$IFS
IFS="-"
ARGS="$*"
IFS=$OLDIFS
man $ARGS