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
# These commands will proxy /xyz to port 9094 | |
ProxyPreserveHost On | |
ProxyRequests Off | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
RewriteRule ^/xyz(.*)$ http://127.0.0.1:9094$1 [P,L] | |
ProxyPassReverse /xyz http://127.0.0.1:9094 |
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
-- return a fixed user | |
-- note: you'll have to register a user named "user" before making this change | |
getLoggedInUser :: MonadIO m => Params -> m (Maybe String) | |
getLoggedInUser params = return $ Just "user" |
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
------------------------------------------------------------- | |
Centered Default Right Left | |
Header Aligned Aligned Aligned | |
----------- ------- --------------- ------------------------- | |
First row 12.0 Example of a row that | |
spans multiple lines. | |
Second row 5.0 Here's another one. Note | |
the blank line between | |
rows. |
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
-- Create pandoc.1 man page from README | |
import Text.Pandoc | |
import Data.ByteString.UTF8 (toString, fromString) | |
import Data.Char (toUpper) | |
import qualified Data.ByteString as B | |
import Control.Monad | |
import System.FilePath | |
main = do | |
rmContents <- liftM toString $ B.readFile "README" |
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
lettrine :: Format -> InlineDoc -> InlineDoc -> Doc | |
lettrine "html" (InlineDoc x) (InlineDoc y) = | |
inTags "span" [("class","lettrine")] x +++ y | |
lettrine "latex" (InlineDoc x) (InlineDoc y) = | |
ctl "lettrine" +++ grp [x] +++ grp [y] |
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
-- math2svg.hs | |
-- compile with: | |
-- ghc --make math2svg.hs | |
-- run using: | |
-- pandoc -t json -s | ./math2svg | pandoc -f json | |
import Text.Pandoc | |
import Text.JSON.Generic | |
main = getContents >>= transform . decodeJSON >>= putStrLn . encodeJSON |
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
-- This parses a simple language that allows word substitutions | |
-- to be defined. | |
-- | |
-- Definitions are of the form WORD=WORD (where a WORD is a sequence | |
-- of letters). They may occur anywhere in the document, and they | |
-- will cause the WORD on the left to be replaced by the WORD on | |
-- the right anywhere in the document (before or after the | |
-- definition). Note that the WORD on the right may itself | |
-- be defined. So, for example, the input | |
-- |
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
{-# OPTIONS_GHC -Wall -fwarn-tabs #-} | |
{-# LANGUAGE ForeignFunctionInterface #-} | |
---------------------------------------------------------------- | |
-- Modified by John MacFarlane from an earlier benchmark by | |
-- wren ng thornton. | |
--------------------------------------------------------------- | |
module Main (main) where | |
import qualified Data.Char as C | |
import Foreign.C.Types (CInt(..)) |
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
{-# OPTIONS_GHC -Wall -fwarn-tabs #-} | |
{-# LANGUAGE ForeignFunctionInterface #-} | |
---------------------------------------------------------------- | |
-- Modified by John MacFarlane from an earlier benchmark by | |
-- wren ng thornton. | |
-- Normalized benchmark results: | |
-- | |
-- Compiled without optimization: | |
-- -------------------------------------------------------------- |
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
{-# OPTIONS_GHC -Wall -fwarn-tabs #-} | |
{-# LANGUAGE ForeignFunctionInterface #-} | |
---------------------------------------------------------------- | |
-- Modified by John MacFarlane from an earlier benchmark by | |
-- wren ng thornton. | |
-- Normalized benchmark results: | |
-- | |
-- Compiled without optimization: | |
-- -------------------------------------------------------------- |
OlderNewer