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
simonmichael / accounts.txt
Last active Sep 14, 2019
a sample *ledger chart of accounts (first 3 levels): combined personal & business, eg for a freelancer
View accounts.txt
assets
business
accounts receivable
bank
personal
accounts receivable
bank
cash
gifts
online
@simonmichael
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
Usage:
./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
simonmichael / a.bash
Last active Sep 3, 2019
scripts for finding available versions in nixpkgs
View a.bash
# Some nixpkgs query scripts inspired by #nixos chat.
# Goal: find the HASH that will let an install command like
# nix-env -i -f https://github.com/NixOS/nixpkgs/archive/HASH.tar.gz -A hledger hledger-web hledger-ui
# install the latest available build of the packages, on all platforms of interest.
# These scripts don't seem to quite do that but they help.
NIXARCHS="darwin linux"
HLEDGERPKGS="hledger hledger-ui hledger-web"
# show help for the following commands
@simonmichael
simonmichael / .bashrc.task
Last active Aug 21, 2019
taskwarrior config 2016/01
View .bashrc.task
# Simon's taskwarrior aliases
########################################
# general commands
alias t="task"
alias ta="task add"
alias td="task done"
alias t-="task delete"
alias tm="task modify"
View hledger.prof
This file has been truncated, but you can view the full file.
Fri Jul 26 00:40 2019 Time and Allocation Profiling Report (Final)
hledger +RTS -P -RTS bal -V -f examples/1000x1000x10.journal
total time = 1.35 secs (1347 ticks @ 1000 us, 1 processor)
total alloc = 1,482,942,296 bytes (excludes profiling overheads)
COST CENTRE MODULE SRC %time %alloc ticks bytes
@simonmichael
simonmichael / a.txt
Created Jun 9, 2017
Ledger 3.1.1 options related to prices and valuation
View a.txt
Ledger 3.1.1 options related to prices and valuation
COMMANDS
balance
--basis (-B) Report in terms of cost basis, not amount or value. This is the only form of report which is guaranteed to always balance to zero, when no report-query
is specified. Only show totals for the top-most accounts.
register
--exchange commodity (-X)
Render all values in the given commodity, if a price conversion rate can be determined. Rates are always displayed relative to the date of the posting
@simonmichael
simonmichael / gist:1070020
Created Jul 7, 2011
sample invoice layout in pandoc markdown
View gist:1070020
# INVOICE 20110706xx
------------------------------------- ---------------------------------
**To:**<br> **From:**<br>
Client XX<br> me<br>
address<br> address<br>
<br> <br>
<br> Email: ...<br>
<br> Phone: ...<br>
@simonmichael
simonmichael / envelope-budgeting.journal
Last active Jun 27, 2019
envelope budgeting example
View envelope-budgeting.journal
; An example of YNAB-ish envelope budgetting with hledger/ledger
; cf https://github.com/simonmichael/hledger/issues/315
; Using accounts like the following:
;
; assets
; business
; bank
; wf
; bchecking
@simonmichael
simonmichael / Makefile
Created Mar 3, 2018
XpenseTracker -> hledger makefile
View Makefile
# XpenseTracker iOS app -> hledger import & reports
#
# Fetch csv files from XpenseTracker iphone app (requires curl, funzip).
# Procedure:
# connect phone and computer to same network
# make csv
# start XpenseTracker app
# enter each XpenseTracker log, as prompted on computer
# (first time: options, set appropriate CSV fields)
# options, export, export
@simonmichael
simonmichael / a.txt
Created May 18, 2019
nix show-config
View a.txt
11:41:36 ~$ nix show-config
allow-import-from-derivation = true
allow-unsafe-native-code-during-evaluation = false
allowed-impure-host-deps = /System/Library /bin/sh /dev /usr/lib
allowed-uris =
allowed-users = *
auto-optimise-store = false
build-hook = /nix/store/1jz25hcma179wbpi56blgajw47n5kgqd-nix-2.2.1/libexec/nix/build-remote
build-poll-interval = 5
build-users-group =
You can’t perform that action at this time.