Skip to content

Instantly share code, notes, and snippets.

Simon Michael simonmichael

Block or report user

Report or block simonmichael

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
simonmichael / finance.txt
Last active Aug 29, 2015
hledger register --width to avoid account name eliding
View finance.txt
$ cat t.j
2014/01/01 This is some fun stuff
Expenses:BrigadoonChannel:Jebediah:Cheese $100.00
Expenses:BrigadoonChannel:Jebediah:Eastern&Western $100.00
Expenses:BrigadoonChannel:Jebediah:Tea&TeaImplements $100.00
Expenses:BrigadoonChannel:Jebediah:CandyBars $100.00
Expenses:BrigadoonChannel:Jebediah:Light&Dark $100.00
Liabilities:Payable:MagicTown $-500.00
$ hledger -f t.j reg
2014/01/01 This is some fun .. Ex:Br:Je:Cheese $100.00 $100.00
View finance.txt
~/personal$ hledger -f t.j reg Tea
2014/01/01 This is some fun .. ..:Tea&TeaImplements $100.00 $100.00
~/personal$ hledger -f t.j reg Tea -w150
2014/01/01 This is some fun stuff Expenses:BrigadoonChannel:Jebediah:Tea&TeaImplements $100.00 $100.00
View shelltest.hs
import Control.Applicative ((<$>))
import Control.Concurrent (forkIO)
import Control.Concurrent.MVar (newEmptyMVar, putMVar,
import Control.Monad (liftM, unless, when)
import Data.Algorithm.Diff
import Data.List
import Data.Maybe (catMaybes, fromJust,
isJust, isNothing)
import Debug.Trace
simonmichael / hledger-rewrite.hs
Last active Aug 29, 2015
hledger-rewrite sketch
View hledger-rewrite.hs
#!/usr/bin/env runhaskell
hledger-rewrite PATTERNS --add-posting "ACCT AMTEXPR" ...
Skeleton for a minimal generic rewriter of journal entries.
Reads the default journal and prints the entries, like print,
but adds the specified postings to any entries matching PATTERNS.
View .paypal.csv.rules .sh
# sample of CSV being converted
#Date, Time, Time Zone, Name, Type, Status, Currency, Amount, Receipt ID, Balance,
#"7/20/2009","17:09:22","PDT","Skype","Preapproved Payment Sent","Completed","USD","-10.00","","0.00",
# skip the header line
skip 1
# name the csv fields, and assign some of them as entry fields
fields date, time, timezone, description, type, status, currency, grossamount, feeamount, netamount, fromemail, toemail, code, counterpartystatus, etc
simonmichael / Settings.hs
Created Feb 19, 2014
darcs hub settings excerpt
View Settings.hs
-- settings:
-- optional features
multiuser = True -- Enable user registration ?
issuetrackers = True -- Enable optional issue trackers ?
deletefiles = True -- Delete repos from the filesystem when deleted in the web UI ?
-- app url
baseUrl = "http://" ++ hostname ++ basePort ++ basePath
hostname = ""
simonmichael / supervisord.conf
Created Mar 27, 2014
example supervisord config for running rss2irc
View supervisord.conf
command=/usr/local/bin/rss2irc --debug-feed --debug-irc -i5 --description --html --replace '<i>Added by (\w*).*<\/i>(?:<p>)?(.*)/\2 (\1)' --ident 'hackage upload announce bot, owner: sm' --use-actions -$
View gist:10701180
$ cabal install hledger-web-0.22.4 --dry
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: hledger-web-0.22.4 (user goal)
trying: yesod-static- (dependency of hledger-web-0.22.4)
trying: wai-app-static-2.0.1 (dependency of yesod-static-
trying: yesod- (dependency of hledger-web-0.22.4)
trying: yesod-auth- (dependency of yesod-
trying: authenticate- (dependency of yesod-auth-
trying: tagstream-conduit- (dependency of authenticate-
View gist:10701275
$ cabal install ~/src/hledger/hledger-web --dry
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: hledger-web-0.22.98 (user goal)
trying: hledger-web-0.22.98:-blaze_html_0_4
trying: blaze-markup- (dependency of
trying: yesod-static- (dependency of hledger-web-0.22.98)
trying: unordered-containers- (dependency of yesod-static-
trying: hashable- (dependency of unordered-containers-

Keybase proof

I hereby claim:

  • I am simonmichael on github.
  • I am simonmichael ( on keybase.
  • I have a public key whose fingerprint is E78A 85A8 9696 FABE 7ED1 CAE6 9ED5 BEB2 E43A B4B4

To claim this, I am signing this object:

You can’t perform that action at this time.