Skip to content

Instantly share code, notes, and snippets.

View cmoore's full-sized avatar
🆑

Clint Moore cmoore

🆑
View GitHub Profile
module Main where
import qualified Data.ByteString.Char8 as B
import Data.Tree.NTree.TypeDefs
import Data.Maybe
import Text.XML.HXT.XPath
import Text.XML.HXT.Core
import Control.Monad
import Control.Monad.Trans
/home/cmoore/bins/ghc-7.4.1/lib/ghc-7.4.1/package.conf.d:
Cabal-1.14.0
array-0.4.0.0
base-4.5.0.0
bin-package-db-0.0.0.0
binary-0.5.1.0
bytestring-0.9.2.1
containers-0.4.2.1
deepseq-1.3.0.0
directory-1.1.0.2
@cmoore
cmoore / parenscript_oh_snap.lisp
Created June 19, 2012 04:17
parenscript shows me how little I really know so far about CL
(defpsmacro $ (selector &body chains)
`(chain (j-query ,selector)
,@chains))
; Clearly, this did not work like I expected...
(defpsmacro jq-submit (element function)
`(let ((td (concatenate 'string "#" ,element)))
(($ (@ td) ,function))))
(defun i/refresh-imap (login password server)
(let ((iconn (make-imap :port 993
:host server
:ssl-p t)))
(cmd-connect iconn)
(cmd-login iconn login password)
(cmd-select iconn "inbox")
(mapcar (lambda (x)
(parse-fetch-fields
@cmoore
cmoore / cl-mongo-test-quick-test.txt
Created August 13, 2012 22:43
cl-mongo-test:quick-test normal output
CL-MONGO-TEST> (quick-test)
---- starting test of package : { test counting documents } ---------------
testing counting : client count : 43 -- server count 43.0d0
---- finished test of package { test counting documents } sucessfully ------
---- starting test of package : { finding documents by field } ---------------
findOne is default : 1
limit == 0 returns all 43 : 43
---- finished test of package { finding documents by field } sucessfully ------
---- starting test of package : { deleting documents } ---------------
---- finished test of package { deleting documents } sucessfully ------
CL-MONGO-TEST> (quick-test)
---- starting test of package : { test counting documents } ---------------
testing counting : client count : 43 -- server count 43.0d0
---- finished test of package { test counting documents } sucessfully ------
---- starting test of package : { finding documents by field } ---------------
findOne is default : 1
limit == 0 returns all 43 : 43
---- finished test of package { finding documents by field } sucessfully ------
---- starting test of package : { deleting documents } ---------------
---- finished test of package { deleting documents } sucessfully ------
CL-MONGO-TEST> (quick-test)
---- starting test of package : { test counting documents } ---------------
testing counting : client count : 43 -- server count 43.0d0
---- finished test of package { test counting documents } sucessfully ------
---- starting test of package : { finding documents by field } ---------------
findOne is default : 1
limit == 0 returns all 43 : 43
---- finished test of package { finding documents by field } sucessfully ------
---- starting test of package : { deleting documents } ---------------
---- finished test of package { deleting documents } sucessfully ------
CL-MONGO-TEST> (quick-test)
---- starting test of package : { test counting documents } ---------------
testing counting : client count : 43 -- server count 43.0d0
---- finished test of package { test counting documents } sucessfully ------
---- starting test of package : { finding documents by field } ---------------
findOne is default : 1
limit == 0 returns all 43 : 43
---- finished test of package { finding documents by field } sucessfully ------
---- starting test of package : { deleting documents } ---------------
---- finished test of package { deleting documents } sucessfully ------
Tue Aug 14 07:41:16 [initandlisten] MongoDB starting : pid=32516 port=27017 dbpath=./data 64-bit
** NOTE: This is a development version (1.7.6) of MongoDB.
** Not recommended for production.
Tue Aug 14 07:41:16 [initandlisten] db version v1.7.6, pdfile version 4.5
Tue Aug 14 07:41:16 [initandlisten] git version: 5909aa6962bebe24f7cd65b924053a5cf70b83d3
Tue Aug 14 07:41:16 [initandlisten] sys info: Darwin erh2.10gen.cc 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40
Tue Aug 14 07:41:16 [initandlisten] waiting for connections on port 27017
Tue Aug 14 07:41:16 [websvr] web admin interface listening on port 28017
Tue Aug 14 07:43:08 [initandlisten] MongoDB starting : pid=32541 port=27017 dbpath=./data 64-bit
Tue Aug 14 07:43:08 [initandlisten] db version v1.8.5, pdfile version 4.5
Tue Aug 14 07:43:08 [initandlisten] git version: 403c8dadcd56f68dcbe06013ecbfac67b32a22ac
Tue Aug 14 07:43:08 [initandlisten] build sys info: Darwin erh2.10gen.cc 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40
Tue Aug 14 07:43:08 [initandlisten] waiting for connections on port 27017
Tue Aug 14 07:43:08 [websvr] web admin interface listening on port 28017
Tue Aug 14 07:43:13 [initandlisten] connection accepted from 127.0.0.1:60138 #1
Tue Aug 14 07:43:13 [conn1] end connection 127.0.0.1:60138
Tue Aug 14 07:43:13 [initandlisten] connection accepted from 127.0.0.1:60139 #2
Tue Aug 14 07:43:13 [FileAllocator] allocating new datafile ./data/test.ns, filling with zeroes...