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
Maximum connect burst length: 1 | |
Total: connections 2500 requests 1682 replies 1512 test-duration 17.787 s | |
Connection rate: 140.5 conn/s (7.1 ms/conn, <=784 concurrent connections) | |
Connection time [ms]: min 918.4 avg 2925.9 max 7786.2 median 2815.5 stddev 1428.4 | |
Connection time [ms]: connect 1263.4 | |
Connection length [replies/conn]: 1.000 | |
Request rate: 94.6 req/s (10.6 ms/req) | |
Request size [B]: 69.0 | |
Reply rate [replies/s]: min 34.4 avg 77.4 max 120.4 stddev 43.0 (3 samples) | |
Reply time [ms]: response 1645.7 transfer 0.0 |
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
; it just ignores everything! | |
(nmap setKey:"<cmd-p>" toAction:"vi_undo:") |
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
squid:web seanhess$ cabal update | |
Downloading the latest package list from hackage.haskell.org | |
squid:web seanhess$ cabal install hack2-handler-snap-server | |
Resolving dependencies... | |
Configuring hack2-handler-snap-server-2011.10.12... | |
Preprocessing library hack2-handler-snap-server-2011.10.12... | |
Building hack2-handler-snap-server-2011.10.12... | |
[1 of 1] Compiling Hack2.Handler.SnapServer ( src/Hack2/Handler/SnapServer.hs, dist/build/Hack2/Handler/SnapServer.o ) | |
src/Hack2/Handler/SnapServer.hs:72:55: |
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
Illegal instance declaration for `JSON [Field]' | |
(All instance types must be of the form (T a1 ... an) | |
where a1 ... an are *distinct type variables*, | |
and each type variable appears at most once in the instance head. | |
Use -XFlexibleInstances if you want to disable this.) | |
In the instance declaration for `JSON [Field]' |
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, DeriveDataTypeable #-} | |
-- cabal install json | |
-- cabal install mongoDB | |
import Text.JSON | |
import Text.JSON.Generic | |
import Database.MongoDB | |
import Data.Bson |
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, ExtendedDefaultRules #-} | |
-- https://github.com/mailrank/aeson/blob/master/examples/Demo.hs | |
-- cabal install aeson | |
-- cabal install mongoDb | |
import Data.Aeson | |
import qualified Data.Aeson.Types as T | |
import Data.Attoparsec (parse, Result(..)) |
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, ExtendedDefaultRules #-} | |
-- https://github.com/mailrank/aeson/blob/master/examples/Demo.hs | |
-- cabal install aeson | |
-- cabal install mongoDb | |
import Data.Aeson | |
import qualified Data.Aeson.Types as T | |
import Data.Attoparsec (parse, Result(..)) |
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, ExtendedDefaultRules #-} | |
{- | |
db <- mdb | |
db $ delete $ select [] "tags" | |
-} | |
module Mongo (mdb) where | |
import Database.MongoDB |
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
get "/io" - do | |
file <- readFile "sandbox.hs" | |
text "hello" |
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
-- http://hackage.haskell.org/packages/archive/hexpat/0.19.7/doc/html/Text-XML-Expat-SAX.html#g:2 | |
-- http://stackoverflow.com/questions/2292729/with-haskell-how-do-i-process-large-volumes-of-xml | |
import qualified Data.ByteString.Lazy as BSL | |
import Prelude hiding (readFile) | |
import Text.XML.Expat.SAX | |
main = do | |
-- I need a ByteString | |
contents <- BSL.readFile "schedules.xml" |