Skip to content

Instantly share code, notes, and snippets.

View keathley's full-sized avatar

Chris Keathley keathley

View GitHub Profile
@keathley
keathley / possibly.ex
Created January 7, 2016 20:57
Monads and Maybes in elixir
defprotocol Functor do
def fmap(data, func)
end
defprotocol Applicative do
def pure(data)
def run(wrapped_func, data)
end
defprotocol Monad do

Keybase proof

I hereby claim:

  • I am keathley on github.
  • I am spyc3r (https://keybase.io/spyc3r) on keybase.
  • I have a public key whose fingerprint is CED4 D583 39C4 E14C 2C7A 8027 B8A2 2126 47DF 010B

To claim this, I am signing this object:

<!DOCTYPE html>
<html>
<head>
<title>Turnt</title>
<link href="index.css" rel="stylesheet" type="text/css"/>
<link href="http://fonts.googleapis.com/css?family=Roboto+Slab" rel="stylesheet" type="text/css">
<script src='https://cdn.firebase.com/js/client/2.2.1/firebase.js'></script>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js'></script>
</head>
<body>
@keathley
keathley / acceleration_test.html
Created February 19, 2015 01:12
a simple test to capture acceleration data from a mobile decive
<html>
<head>
</head>
<body>
<ul id="log">
</ul>
<script>
var logger = document.getElementById('log');
@keathley
keathley / chutes_and_ladders.go
Created October 12, 2014 23:17
"Hello World" in Go
package main
import (
"fmt"
"math"
"math/rand"
"time"
"sort"
)
@keathley
keathley / keybase.md
Last active August 29, 2015 14:02
keybase.md

Keybase proof

I hereby claim:

  • I am keathley on github.
  • I am spyc3r (https://keybase.io/spyc3r) on keybase.
  • I have a public key whose fingerprint is E9B0 6170 589B 04E4 7965 23E0 21C7 073E CB57 574A

To claim this, I am signing this object:

@keathley
keathley / app.js.coffee
Created May 10, 2014 17:43
csrf headers for angular
angular.module('app', [])
.config(['$httpProvider', ($httpProvider) ->
authToken = $("meta[name=\"csrf-token\"]").attr("content")
$httpProvider.defaults.headers.common["X-CSRF-TOKEN"] = authToken
])