Skip to content

Instantly share code, notes, and snippets.

View johannesvogel's full-sized avatar

Johannes Vogel johannesvogel

View GitHub Profile
@johannesvogel
johannesvogel / .mailfilter
Last active February 3, 2019 06:19
Uberspace 7: Forward emails sent to specific domains
# set Maildir
MAILDIR = "$HOME/Maildir"
# forward all emails sent to "@mydomain.de"
# to "[email protected]"
if (/^To:.*@mydomain\.de/:h)
{
to "[email protected]"
exit
}
@johannesvogel
johannesvogel / haskell-long.hs
Last active September 28, 2015 15:49
coins
main = do
money <- getLine
mapM putStr $ coins [200, 100, 50, 20, 10, 5, 2, 1] (read money)
coins [] _ = []
coins (x:xs) y
| x <= y = (coin x) : coins (x:xs) (y-x)
| x > y = coins xs y
coin x