This file contains 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
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE KindSignatures #-} | |
class Zomg a where | |
zomg :: a -> String | |
data Errr a = Errr a | |
instance Zomg (Errr a) where | |
zomg a = "ROckin" |
This file contains 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
-- a huge number of imports above | |
main :: IO () | |
main = do | |
createDirectoryIfMissing True "output" | |
env <- getAppEnv | |
let connInfo = dbConnectInfo env | |
db <- dbConnection connInfo | |
queryText <- BS.readFile "db/errors.sql" | |
results <- query_ db (Query queryText) |
This file contains 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
twiceWhenEven :: [Integer] -> [Integer] | |
twiceWhenEven xs = do | |
x <- xs | |
if even x | |
then [x*x, x*x] | |
else [x*x] | |
-- Prelude> twiceWhenEven [1..3] | |
-- [1,4,4,9] |
This file contains 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
#!/bin/sh | |
# Dropbox setup on a headless Ubuntu Server | |
# Script written by Jesse B. Hannah (http://jbhannah.net) <jesse@jbhannah.net> | |
# Based on http://wiki.dropbox.com/TipsAndTricks/UbuntuServerInstall | |
### | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |