Skip to content

Instantly share code, notes, and snippets.

Simon Michael simonmichael

View GitHub Profile
simonmichael / plaid-wf-pchecking.csv.rules
Created Mar 27, 2019
hledger CSV rules for CSV downloaded from Plaid
View plaid-wf-pchecking.csv.rules
include common.rules
include plaid.rules
account1 sm:assets:bank:wf:pchecking
simonmichael /
Last active Mar 15, 2019
intellij-haskell 0.44 notes

intellij-haskell 0.44 feedback

tested with IntelliJ IDEA 2018.3, mac mojave, 2013 macbook air with 8G ram, hledger repo


had to remove alpha plugins repo to see beta 44

installed smoothly in a few minutes (most things probably previously installed)

continuing intermittent errors about starting stack repl taking more than 5s and haskell support not available yet

while building hoogle db ?

turned off power save mode for inspections, and for hlint installation to complete (?)

type signature on hover seemed to work intermittently, was hard to discover

I tried all of these, only the last works, shouldn’t it be just hover ? Or at least, don’t require moving off word

simonmichael / a.txt
Created Mar 13, 2019
nix install log
View a.txt
~$ nix-env -f channel:nixos-unstable -iA hledger
unpacking ''...
replacing old 'hledger-1.14.1'
installing 'hledger-1.14.1'
these derivations will be built:
simonmichael / 1-example
Last active Sep 10, 2019
finance scripts in a robust shake file
View 1-example
~/notes$ ./do.hs
Linking do ...
~/notes$ ./do
./do.hs install deps & (re)compile this script
./do [help] show this help
./do time show time status
./do money show money status
./do lassets show liquid assets
./do incexp show monthly income & expenses
simonmichael / 1-Makefile
Last active Mar 8, 2019
make rules and short symbols setup for (
View 1-Makefile
YEAR:=$(shell date +%Y)
# Fetch latest market prices, add P records to prices file.
MARKET_PRICES=~/src/PLAINTEXTACCOUNTING/hledger-scripts/market-prices/ <market-prices.json
.PHONY: prices prices-dry
simonmichael / a.hs
Last active Mar 1, 2019
strange non-exhaustive error with GHC 7
View a.hs
addOrAssignAmountAndCheckAssertionB :: Posting -> Balancing s Posting
addOrAssignAmountAndCheckAssertionB p@Posting{paccount=acc, pamount=amt, pbalanceassertion=mba} -- line 730
| hasAmount p = do
newbal <- addAmountB acc amt
whenM (R.reader bsAssrt) $ checkBalanceAssertionB p newbal
return p
| Nothing <- mba = return p
| Just BalanceAssertion{baamount,batotal} <- mba = do
(diff,newbal) <- case batotal of
True -> do
simonmichael / a.journal
Created Feb 25, 2019
hledger: applying transaction modifier rules selectively with tags
View a.journal
; transaction modifier (auto postings) rule
; Txns after 2019/1/1 with a (unbalanced) revenues posting,
; and which don't have the modified: tag, like this:
;2019/2/1 (cwYYYYMM) client cw | payment
; (JS:revenues:cw) $-1000
; will have some standard postings added. This can be used for forecasting.
= date:2019- JS:revenues:cw not:tag:modified
simonmichael / a.txt
Created Jan 31, 2019
hledger commands list 20190131
View a.txt
$ hledger
hledger 1.12.99
Commands (+ addons found in $PATH):
Data entry (these commands modify the journal file):
add add transactions using guided prompts
+iadd add transactions using curses ui
View gist:9b209b192de2ba79232475a50fdc0061
case () of
_ | changes==movedown -> printf "%d,%dv " x y
_ | changes==moveleft -> printf "<%d,%d " x y
_ | changes==moveright -> printf "%d,%d> " x y
_ -> printf "%d,%d. " x y
You can’t perform that action at this time.