Skip to content

Instantly share code, notes, and snippets.

Jason Hickner jhickner

Block or report user

Report or block jhickner

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jhickner
jhickner / surfingkeys-config.js
Last active Nov 15, 2018
SurfingKeys Config
View surfingkeys-config.js
settings.modeAfterYank = "Normal";
settings.scrollStepSize = 140;
settings.showModeStatus = true;
settings.focusAfterClosed = "left";
settings.newTabPosition = "last";
iunmap(":");
addSearchAliasX('h', "Hackage", "https://www.google.com/search?q=hackage+", 's');
map("<Shift-ArrowRight>", "R");
@jhickner
jhickner / build-ghc-arm.sh
Last active Aug 29, 2015 — forked from bgamari/build-ghc-arm.sh
updated for rpi 2
View build-ghc-arm.sh
#!/bin/bash -e
bindir=`pwd`/bin-tmp
mkdir -p $bindir
export PATH=$bindir:$PATH
function use_ld() {
rm -f $bindir/ld
ln -s $1 $bindir/ld
echo "Using $1 for ld"
}
View keybase.md

Keybase proof

I hereby claim:

  • I am jhickner on github.
  • I am jhickner (https://keybase.io/jhickner) on keybase.
  • I have a public key whose fingerprint is 4AC8 00C2 FAA3 3025 2AC6 D679 6F29 F8DA E3AE 5667

To claim this, I am signing this object:

View player.hs
import qualified Data.Map as M
type Name = String
data Action = MadeShot | MissedShot | Rebound deriving (Show, Eq)
data Event = Event Name Action
type Players = M.Map Name (Int, Int, Int)
aggregate :: [Event] -> Players
aggregate = M.fromListWith f . map toPair
where
View echo.hs
import Control.Proxy
import Control.Proxy.TCP
main :: IO ()
main = serve (Host "0.0.0.0") "8000" $ \(socket,_) ->
runProxy $ socketReadS 4096 socket >-> socketWriteD socket
View TCP.hs
-- adapted from the pipes-network package
-- http://hackage.haskell.org/package/pipes-network
module TCP (
-- * Server side
-- $server-side
serve,
serveFork,
-- ** Listening
listen,
View reddit.hs
{-# LANGUAGE TemplateHaskell, OverloadedStrings, FlexibleInstances, TypeSynonymInstances #-}
import Network.URI (URI, parseURI)
import Network.HTTP
import Control.Applicative
import Data.Aeson
import qualified Data.ByteString.Lazy as BL
import Data.Maybe (fromJust)
redditURL = fromJust . parseURI $ "http://www.reddit.com/by_id/t3_1c578w.json"
View pipesGameState.hs
import Control.Monad
import Control.Applicative
import Control.Proxy
import qualified Control.Proxy.Trans.State as S
import System.IO
import Prelude hiding (Left, Right)
type Pos = (Int, Int)
data Input = Up | Down | Left | Right | Invalid deriving Show
View changePointIndexes.hs
import Data.Ord (comparing)
import Data.Function (on)
import Data.List (groupBy)
type Point = (Int, Int)
points :: [Point]
points = [ (0, 1)
, (0, 2)
, (0, 2)
View endomorphism2.hs
{-# LANGUAGE RecordWildCards #-}
import Data.Monoid
data SalaryConfig = SalaryConfig
{ sAllowances :: Bool
, sBonus :: Bool
, sTax :: Bool
, sSurcharge :: Bool
}
You can’t perform that action at this time.