This file contains hidden or 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
| import Text.Pandoc.JSON | |
| tocXml :: String | |
| tocXml = "<w:sdt><w:sdtPr><w:docPartObj>"++ | |
| "<w:docPartGallery w:val=\"Table of Contents\" /><w:docPartUnique />"++ | |
| "</w:docPartObj></w:sdtPr><w:sdtContent><w:p><w:pPr>"++ | |
| "<w:pStyle w:val=\"TOCHeading\" /></w:pPr><w:r>"++ | |
| "<w:t>Table of Contents</w:t></w:r></w:p><w:p><w:r>"++ | |
| "<w:fldChar w:fldCharType=\"begin\" w:dirty=\"true\" />"++ | |
| "<w:instrText xml:space=\"preserve\"> TOC \\o \"1-3\" \\h \\z \\u "++ |
This file contains hidden or 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
| import Graphics.X11.Xlib | |
| import Graphics.X11.Xlib.Extras | |
| import System.Environment | |
| main :: IO () | |
| main = sendCommand "XMONAD_COMMAND" =<< getArgs | |
| sendCommand :: String -> [String] -> IO () | |
| sendCommand addr (s:_) = do | |
| d <- openDisplay "" |
This file contains hidden or 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
| import Text.Pandoc.JSON | |
| import Network.Mime | |
| import Data.Text as T | |
| import Data.ByteString.Char8 as BS | |
| import System.Process | |
| go :: Inline -> IO Inline | |
| go (Image alt (src,title)) = | |
| case BS.unpack $ defaultMimeLookup $ T.pack src of | |
| "image/svg+xml" -> do |
This file contains hidden or 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 #-} | |
| import Text.Pandoc.JSON | |
| import System.Directory | |
| import System.FilePath ((</>)) | |
| import qualified Data.Hash.MD5 as MD5 | |
| import qualified Data.Text as T | |
| import System.IO.Temp | |
| import System.Process | |
| import Control.Monad (unless) |
This file contains hidden or 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
| import Codec.Picture | |
| import Codec.Picture.Types | |
| import Graphics.PDF | |
| import Codec.Picture.Saving | |
| import Data.ByteString.Lazy as B | |
| import System.IO (hClose) | |
| import System.IO.Temp | |
| import System.Environment | |
| main :: IO () |
This file contains hidden or 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
| Root directory: /home/livid/github/pandoc-crossref | |
| Current directory: /home/livid/github/pandoc-crossref | |
| GHC Package flags: | |
| -hide-all-packages -no-user-package-db -package-db | |
| /home/livid/github/pandoc-crossref/.cabal-sandbox/x86_64-linux-ghc-7.10.2-packages.conf.d | |
| -package-id base-4.8.1.0-4f7206fd964c629946bb89db72c80011 | |
| -package-id bytestring-0.10.6.0-2362d1f36f1255e85478e7793e15b170 | |
| -package-id containers-0.5.6.2-2de75421d746ab474b330e43191bb31b | |
| -package-id data-default-0.5.3-4c3290e8e96ed6070337a2a566c7dc89 | |
| -package-id mtl-2.2.1-d47f97102c5df05a46949da5cc90a7f3 -package-id |
This file contains hidden or 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
| import Text.Pandoc.JSON | |
| import System.Process | |
| import Text.HTML.TagSoup | |
| main :: IO () | |
| main = toJSONFilter dotToSvg | |
| dotToSvg :: Block -> IO Block | |
| dotToSvg x@(CodeBlock (_, cls, _) text) | |
| | "dot" `elem` cls = do |
This file contains hidden or 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
| struct registry { | |
| static std::map<const char*,Plugin*> plugins; | |
| registry(const char* name, Plugin* plugin) { | |
| plugins[name]=plugin; | |
| } | |
| }; | |
| #define REGISTER(name) \ | |
| registry name ## _register(#name, new name()); | |
This file contains hidden or 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 Rank2Types, TypeOperators, ConstraintKinds, MultiParamTypeClasses #-} | |
| {-# LANGUAGE FlexibleInstances, FlexibleContexts, UndecidableInstances #-} | |
| import XMonad | |
| import Data.Constraint | |
| import XMonad.Layout.LayoutModifier (LayoutModifier, ModifiedLayout) | |
| import XMonad.Layout.NoBorders | |
| type IsLayout l a = (Read (l a), LayoutClass l a) |
This file contains hidden or 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 ConstraintKinds #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE PolyKinds #-} | |
| {-# LANGUAGE Rank2Types #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE FunctionalDependencies #-} | |
| {-# OPTIONS_GHC -Wall #-} |
OlderNewer