Skip to content

Instantly share code, notes, and snippets.

View maerten's full-sized avatar

Maarten Veenstra maerten

  • Utrecht, The Netherlands
View GitHub Profile

Attoparsec Cheatsheet (vs. Regex)

Preconditions

  • OverloadedString extension is applied.
  • The following modules are imported.
    • Control.Applicative
    • Data.Attoparsec.Text
    • Data.Char
@alexspeller
alexspeller / foo.js
Last active December 18, 2015 07:09
// This is the presenter class that stores the state
App.FooPresenter = Em.ObjectProxy.create({
textAreaContent: '',
isExpanded: false
});
// This is your controller - be sure to set the content to a list of models in your route
App.FoosController = Em.ArrayController.extend({
presenters: function() {
@jamiltron
jamiltron / Stack.hs
Created May 18, 2012 21:54
Haskell stack implementation using StateT and IO Maybe Integer
-- IO (Maybe Integer Stack)
-- I can't find the code currently I am basing this off of, but I wanted to be
-- able to learn more about using StateT along with Maybe types.
import Control.Monad.State
main :: IO ()
main = runStateT code Nothing >> return ()
code :: StateT (Maybe [Integer]) IO ()
code = do