Skip to content

Instantly share code, notes, and snippets.

@tgoossens
tgoossens / StreamMock.java
Created March 30, 2013 16:15
needs mockito library
public class StreamMock {
/**
* Will create a mock object. When one of the methods of this mock object is
* invoked, it will write information about this method-call to the given
* printstream.
*
* @param clazz
* @param out
* @return
@tgoossens
tgoossens / gist:10584633
Created April 13, 2014 13:40
org mode bibtex latex process config
#+begin_src emacs-lisp :exports none
(setq reftex-default-bibliography '("bib/references.bib"))
(setq org-latex-pdf-process
'("pdflatex -interaction nonstopmode -output-directory %o %f"
"/usr/bin/bibtex %b"
"pdflatex -interaction nonstopmode -output-directory %o %f"
"pdflatex -interaction nonstopmode -output-directory %o %f"))
(def vars ['a 'b])
(def equation '(+ 1 a b))
;; I want to create a let environemnt such that
;; (let [ [a b] [1 2]] equation)
;; such that in this expression when evaluated, the variables in the quation have been bound
(bindvars vars [1 2] equation)