This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
author :: Parser Author | |
author = between parens (many anyChar) <* eol | |
title :: Parser Title | |
title = do | |
t <- endBy anyChar (optional author) | |
mA <- optional author | |
pure $ Title t mA |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REVISION := 1.wut | |
ARCH := x86_64 | |
PRJ := $(shell basename $(shell pwd)) | |
CABAL := $(PRJ).cabal | |
VER := $(shell awk '/^version:/{ print $$2 }' $(CABAL)) | |
MAINTAINER := $(shell awk '/^maintainer:/{ print $$2 }' $(CABAL)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait HasAString[A] { | |
def getTheString( a: A ): String | |
} | |
// This shenanigan has been pulled from Scalaz Functor definition | |
object HasAString { | |
@inline def apply[A](implicit a:HasAString[A]): HasAString[A] = a | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// The Argonaut docs are quite good at showing how to setup | |
// the various instances that power all of this jazz, but for | |
// the sake of discussion I'll include one of the simplest ones | |
// for just whipping up the required implicits. | |
final case class Wibble ( | |
id: Double, // Because MUAHAHAHAHA | |
wut: String, | |
wat: List[Int] | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.drawImageFinalForm = function(ctx) { | |
return function(elem) { | |
return function(dx) { | |
return function(dy) { | |
return function(dw) { | |
return function(dh) { | |
return function(sx) { | |
return function(sy) { | |
return function(sw) { | |
return function(sh) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Control.Lens.Cons (Cons (..), cons, (<|)) | |
import Data.Maybe (maybe) | |
import Data.Monoid (Monoid) | |
unfoldM :: (Cons s s a a, Monoid s, Monad m) => (b -> m (Maybe (a,b))) -> b -> m s | |
unfoldM f b = maybe (return mempty) (\(a,b') -> cons a <$> unfoldM f b') =<< f b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python from powerline.vim import setup as powerline_setup | |
python powerline_setup() | |
python del powerline_setup | |
set nowrap | |
set wildmode=list:longest | |
" Change cursor in iTerm on insert | |
" let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
" let &t_EI = "\<Esc>]50;CursorShape=0\x7" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
datatype notlist a = NotNil | NotCons of (a * notlist a) | |
structure Pointed : sig | |
class pointed :: (Type -> Type) -> Type | |
val point : a ::: Type -> f ::: (Type -> Type) | |
-> pointed f | |
-> a -> f a | |
val mkPointed : f ::: (Type -> Type) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env rc | |
TERM=dumb | |
SHELL=rc | |
BROWSER=google-chrome | |
fontsrv & | |
plumber | |
tabstop=2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
datatype notlist a = NotNil | NotCons of (a * notlist a) | |
signature NOTFUNCTOR = sig | |
class notfunctor :: (Type -> Type) -> Type | |
val fmap : f :: (Type -> Type) -> a ::: Type -> b ::: Type -> (a -> b) -> f a -> f b | |
val mkNF : f ::: (Type -> Type) -> (a ::: Type -> b ::: Type -> (a -> b) -> f a -> f b) -> notfunctor (f) | |
val notfunctor_notlist : notfunctor notlist | |
end |