I hereby claim:
- I am jonathanlking on github.
- I am jonathanlking (https://keybase.io/jonathanlking) on keybase.
- I have a public key whose fingerprint is 692C 558E B366 B88E D831 91AA B09A CC18 752E 673D
To claim this, I am signing this object:
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
-- Example code from "Type-level Web APIs with Servant" paper | |
-- http://alpmestan.com/servant/servant-wgp.pdf | |
data Proxy a = Proxy |
I hereby claim:
To claim this, I am signing this object:
import Control.Applicative | |
import Data.Maybe | |
import Data.Array | |
import Data.List | |
-- UK coin values in pence | |
coins :: [Int] | |
coins = [500, 200, 100, 50, 20, 10, 5, 2, 1] | |
-- Helper functions |
data Op = Inc Reg Label | Dec Reg Label Label | Halt deriving Eq | |
data Reg = Reg Integer deriving Eq | |
data Label = Label Integer deriving Eq | |
instance Show Op where | |
show Halt = "HALT" | |
show (Inc r l) = (show r) ++ "+ -> " ++ (show l) | |
show (Dec r l l') = (show r) ++ "- -> " ++ (show l) ++ ", " ++ (show l') | |
instance Show Reg where |
#!/usr/bin/env runhaskell | |
import System.Directory | |
import System.Environment | |
import Control.Monad | |
import System.FilePath.Windows | |
import Data.List | |
import Data.Maybe | |
type Name = String |
import Control.Monad | |
import Control.Arrow | |
import Data.List | |
dice :: Int -> [(Int, Int)] | |
dice = freq . map sum . (flip replicateM) [1..6] | |
freq :: Ord a => [a] -> [(a, Int)] | |
freq = map (head &&& length) . group . sort |
#!/usr/bin/env bash | |
# This is a bash port of the Web Economy Bullshit Generator | |
# http://www.dack.com/web/bullshit.html | |
# Now you don't have to worry about commit messages! | |
ARRAY1=("implement" "utilize" "integrate" "streamline" "optimize" "evolve" "transform" "embrace" | |
"enable" "orchestrate" "leverage" "reinvent" "aggregate" "architect" "enhance" "incentivize" "morph" "empower" | |
"envisioneer" "monetize" "harness" "facilitate" "seize" "disintermediate" "synergize" "strategize" "deploy" | |
"brand" "grow" "target" "syndicate" "synthesize" "deliver" "mesh" "incubate" "engage" "maximize" "benchmark" |
#include <stdio.h> | |
#include <stdlib.h> | |
typedef enum type | |
{ | |
CHAR, | |
INT, | |
LONG | |
} type; |
// | |
// DeviceDetailViewController.m | |
// MetaWearApiTest | |
// | |
// Created by Stephen Schiffli on 7/30/14. | |
// Copyright (c) 2014 MbientLab. All rights reserved. | |
// | |
// Amendments made to run UI changes on main thread using GCD by Jonathan King - 31/8/14 | |
#import "DeviceDetailViewController.h" |
<?php | |
function sendNotification($title,$body) | |
{ | |
$AppKey = "YourUrbanAirshipAppKey"; | |
$MasterSecret = "YourUrbanAirshipMasterSecret"; | |
$request = curl_init(); | |
curl_setopt($request, CURLOPT_URL, "https://go.urbanairship.com/api/push/"); | |
curl_setopt($request, CURLOPT_USERPWD, "<$AppKey>:<$MasterSecret>"); |