Skip to content

Instantly share code, notes, and snippets.

@stephan83
stephan83 / tictactoe.hs
Last active June 4, 2019 13:04
Tic Tac Toe
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
-- | Tic Tac Toe
module Main where
import Control.Monad.IO.Class ( MonadIO
, liftIO
@stephan83
stephan83 / ReaderT.hs
Last active May 27, 2019 16:02
Fun with monads
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE UndecidableInstances #-}
-- | Fun with monads
module ReaderT where
import Control.Monad.IO.Class ( MonadIO

Keybase proof

I hereby claim:

  • I am stephan83 on github.
  • I am stephan83 (https://keybase.io/stephan83) on keybase.
  • I have a public key ASDFeXz35RvvbvrXek5djzzGQO_fyczSuNFoFGebbEG5jgo

To claim this, I am signing this object:

#!/bin/bash
set -e
if [ "$1" = 'redis-server' ]; then
chown -R redis .
exec gosu redis "$@"
fi
exec "$@"

Keybase proof

I hereby claim:

  • I am stephan83 on github.
  • I am stephan83 (https://keybase.io/stephan83) on keybase.
  • I have a public key whose fingerprint is C802 6FEE 3F0E 28FF 00E7 9B89 A3F2 16B0 DAB2 6F74

To claim this, I am signing this object:

@stephan83
stephan83 / template-usage.coffee
Created April 8, 2012 17:26
Browserify templates usage
template = require './path/to/template'
html = template {text: 'This is awesome.'}
@stephan83
stephan83 / browserify-templates.coffee
Created April 8, 2012 17:20
Browserify templates
browserify = require 'browserify'
eco = require 'eco'
bundle = browserify {
mount: '/javascripts/bootstrap.js'
}
bundle.register '.eco', (body) ->
"module.exports = #{eco.precompile body};"
bundle.addEntry path.join(__dirname, './lib/bootstrap.coffee')
layout title baseline
post
My first post
This is my first blog post!

Welcome to my github/Jekyll blog.

@stephan83
stephan83 / _config.yml
Created December 7, 2011 12:39
stephan83.github.com _config.yml
permalink: /:month-:day-:year/:title.html
# Theme settings
theme:
# Site name
site_name: My blog
# Google analytics UID
google_analytics_uid: UA-12345678-1