Skip to content

Instantly share code, notes, and snippets.

@excid3
excid3 / dynamic-nginx-module-ubuntu-18.04.sh
Created June 20, 2018 17:58
How to compile a dynamic nginx module for Ubuntu 18.04
# 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
@ninegua
ninegua / scrapper.hs
Created April 22, 2015 04:37
Weibo Scrapper (using conduit == 0.2.*) written in 2012
{-# 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)
@rwbarton
rwbarton / A.hs
Last active February 2, 2017 09:32 — forked from 23Skidoo/A.hs
-- 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)
{-# 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(..))
@thoughtpolice
thoughtpolice / Codensity.hs
Created September 12, 2012 07:14
Codensity transformation, problem set, solutions, notes, and other stuff
-- 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 #-}