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
# Install dependencies that nginx was originally compiled with | |
sudo apt install libperl-dev libgeoip-dev libgd-dev | |
# Get the nginx source | |
wget https://nginx.org/download/nginx-1.14.0.tar.gz | |
tar zxf nginx-1.14.0.tar.gz | |
# Get the module source | |
wget https://github.com/fdintino/nginx-upload-module/archive/master.zip | |
unzip master.zip |
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 OverloadedStrings, RankNTypes, ScopedTypeVariables, | |
NoMonomorphismRestriction, DeriveDataTypeable #-} | |
module Main where | |
import Prelude hiding (and, catch) | |
import Data.Char (toLower) | |
import Data.Conduit | |
import Data.Conduit.Util | |
import Data.Conduit.ImageSize (sinkImageInfo) | |
import Data.Conduit.Binary (sourceFile, conduitFile, sinkFile) |
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
-- Code taken from http://stackoverflow.com/questions/12735274/breaking-data-set-integrity-without-generalizednewtypederiving/12744568#12744568 | |
-- Discussion on haskell-cafe: http://thread.gmane.org/gmane.comp.lang.haskell.cafe/100870 | |
-- http://www.haskell.org/pipermail/haskell-cafe/2012-October/103984.html | |
-- Modified to remove orphan instances by rwbarton | |
module A where | |
data U = X | Y deriving (Eq, Ord, Show) | |
data T u b c = T u b c deriving (Eq, Show) |
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 TemplateHaskell #-} | |
module Main | |
where | |
import System.Environment (getArgs) | |
import Data.ByteString.Char8 (pack) | |
import Control.Distributed.Process (say, Process, spawnLink, RemoteTable) | |
import Control.Distributed.Process.Node (newLocalNode, initRemoteTable, runProcess, localNodeId, LocalNode(..)) | |
import Control.Distributed.Process.Internal.Types (NodeId(..)) |
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
-- Inspired by the writings of Edward Kmett, Edward Yang and Gabriel Gonzalez | |
-- concerning free monads and the codensity transformation. | |
-- | |
-- http://comonad.com/reader/2011/free-monads-for-less/ | |
-- http://blog.ezyang.com/2012/01/problem-set-the-codensity-transformation/ | |
-- http://www.haskellforall.com/2012/06/you-could-have-invented-free-monads.html | |
-- | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FlexibleInstances #-} |