Skip to content

Instantly share code, notes, and snippets.

View epsilonhalbe's full-sized avatar

Martin Heuschober epsilonhalbe

View GitHub Profile
@epsilonhalbe
epsilonhalbe / StudiBrief.md
Last active August 29, 2015 14:01
Brief an die Studierenden der Mathematik

∀ Studis: ∃: Life after Uni ??

Martin Heuschober

  1. Juni 2014

CC-BY-NC-SA 4.0

@epsilonhalbe
epsilonhalbe / xmonad.hs
Created June 28, 2012 22:37
xmonad with urgency hooks
import System.IO
import Data.Ratio
import Control.Monad (liftM2)
import XMonad
-- import XMonad.Config.Gnome
import Data.Monoid
import System.Exit
@epsilonhalbe
epsilonhalbe / .vimrc
Created June 4, 2012 10:24
vim configuration file
" .vimrc
" OrigAuthor: Steve Losh <steve@stevelosh.com>
" OrigSource: http://bitbucket.org/sjl/dotfiles/src/tip/vim/
" Author: Martin Heuschober <epsilonhalbe@gmail.com>
" Source: http://http://github.com/epsilonhalbe/dotfiles/vimrc
"
" This file changes a lot. I'll try to document pieces of it whenever I have
" a few minutes to kill.
" Preamble ---------------------------------------------------------------- {{{
@epsilonhalbe
epsilonhalbe / MyCombinatorics.hs
Created January 9, 2012 12:45
combinatorical functions for lambdaheads - 2012-01-09
module MyCombinatorics where
import Data.List ( (\\),
sort)
import Control.Applicative ( liftA2,
Applicative,
pure)
(^*) :: (a -> b) -> (b -> c) -> a -> c
f ^* g = g . f
@epsilonhalbe
epsilonhalbe / MyCombinatorics.hs
Created January 2, 2012 20:22
combinatorical functions for lambdaheads - 2012-01-09
module MyCombinatorics where
import Data.List ( (\\),
sort)
import Control.Applicative ( liftA2,
Applicative,
pure)
(^*) :: (a -> b) -> (b -> c) -> a -> c
f ^* g = g . f
module Transformer (dec2bin, bin2dec, dec2hex, hex2dec, num2letters, letters2num) where
dec2bin :: Int -> [Int]
dec2bin n
|n==0 = []
|otherwise = (dec2bin (div n 2))++[mod n 2]
bin2dec :: [Int] -> Int
bin2dec bs = foldl1 (\x y ->x*2+y) bs
@epsilonhalbe
epsilonhalbe / mastermind.hs
Created March 8, 2011 00:14
λ-heads 2011.03.07
{- my (=ε/2) haskellous version of the game called mastermind -}
import Data.List.Split (splitOneOf)
{- has to be fetched with
foo@bar~> cabal update
foo@bar~> cabal install split
-}
import Random
main = do