Skip to content

Instantly share code, notes, and snippets.

View agravier's full-sized avatar
💭
Ceci n'est pas mon statut

Alexandre Gravier agravier

💭
Ceci n'est pas mon statut
View GitHub Profile
@agravier
agravier / atticus-mock-multimethod-solution.clj
Created November 9, 2010 16:44
atticus mocks don't allow overloaded functions
(atticus.mock/expects
[(update-game-state [a b & rest] (atticus.mock/times 5))]
(call-tested-f))
@agravier
agravier / lazy-eval-and-mocks-solution.clj
Created November 9, 2010 16:58
Mocks may prevent lazy sequences from being realized.
user> (tested-f-t)
FAIL in (tested-f-t) (mock.clj:27)
Expected 3 calls to mocked-f. 0 seen.
expected: (= actual expected)
actual: (not (= 0 3))
nil
@agravier
agravier / this.is.not.the.best.file.in.the.world.this.is.just.a.snippet.tex
Last active December 20, 2015 13:08
I modified a few snippets from Tom from http://texblog.org/ to suit my needs. The structured LoT made by the original doesn't work with longtable. Also, it structures by part, not chapter, but if you need chapters, that's easy to change by following to the original: http://texblog.org/2012/01/18/adding-additional-structure-to-the-list-of-figures…
% Lists of figures, tables and listings with part headings
\usepackage{etoolbox}
\makeatletter
% Create a flag
\providebool{newpartfig}
\providebool{newparttab}
\providebool{infigure}
\providebool{intable}
% Fix the \part command to set a flag

Keybase proof

I hereby claim:

  • I am agravier on github.
  • I am agravier (https://keybase.io/agravier) on keybase.
  • I have a public key ASBYHRyyl2NfPMflcokfbClHWV97_F-fsgDs9PAA8csKFQo

To claim this, I am signing this object: