Skip to content

Instantly share code, notes, and snippets.

View christopherlam's full-sized avatar

Christopher Lam christopherlam

  • Western Australia
View GitHub Profile
diff --git a/gnucash/gnucash-cli.cpp b/gnucash/gnucash-cli.cpp
index 23a8475fc9..a677520eea 100644
--- a/gnucash/gnucash-cli.cpp
+++ b/gnucash/gnucash-cli.cpp
@@ -62,6 +62,8 @@ namespace Gnucash {
boost::optional <std::string> m_namespace;
bool m_verbose = false;
+ bool m_interactive_cmd;
+
modified gnucash/report/report-core.scm
@@ -167,7 +167,7 @@
;; A <report-template> represents one of the available report types.
(define-record-type <report-template>
(make-new-record-template version name report-guid parent-type options-generator
- options-cleanup-cb options-changed-cb
+ options-cleanup-cb options-changed-cb options-update-cb
renderer in-menu? menu-path menu-name
menu-tip export-types export-thunk)
report-template?
@christopherlam
christopherlam / guix-infect.sh
Created December 13, 2021 14:33
Guix in WSL2 (with busybox from 0xbadfca11/miniwsl) guix-infect
# wget https://github.com/0xbadfca11/miniwsl/releases/download/release3041562/rootfs.tgz
# wsl --import guix /guix rootfs.tgz --version 2
# wsl -d guix /bin/busybox sh -c "/mnt/c/sys/misc/guix-infect.sh"
mkdir -p /root /etc /tmp /var/run /run /home
chmod 1777 /tmp
rm /etc/passwd
cat <<EOM >> /etc/passwd
root:x:0:0:root:/root:/bin/bash
guixbuilder01:x:999:999:Guix build user 01:/var/empty:/usr/sbin/nologin
@christopherlam
christopherlam / stock-editor.c
Created November 10, 2021 09:11
stock-editor structs
typedef struct
{
AcctType account_type;
char * description;
char * memo;
AmtSign ACCT_AMOUNT_SIGN;
} AcctData;
struct StockAction
{
@christopherlam
christopherlam / pricedb.scm
Created February 20, 2021 13:29
pricedb.scm
(use-modules (srfi srfi-2))
(use-modules (srfi srfi-9))
(use-modules (srfi srfi-26))
(define USD 'USD)
(define GBP 'GBP)
(define CAD 'CAD)
(define EUR 'EUR)
(define-record-type :price
(use-modules (srfi srfi-1) (ice-9 match))
(define list-of-weights
'((CAD USD 700 750)
(CAD GBP 400 250)
(EUR GBP 120 100)
(AUD EUR 150 100)
(AUD JPY 100 7000)
(GBP JPY 70 9000)
(RMB HKD 100 110)))
@christopherlam
christopherlam / test-report-html.patch
Created October 19, 2019 05:56
patch to extricate stylesheets from test-report-html
diff --git a/gnucash/report/report-system/test/test-report-html.scm b/gnucash/report/report-system/test/test-report-html.scm
index 5c672690c..925d26c35 100644
--- a/gnucash/report/report-system/test/test-report-html.scm
+++ b/gnucash/report/report-system/test/test-report-html.scm
@@ -4,11 +4,12 @@
(use-modules (gnucash engine test test-extras))
(use-modules (gnucash report report-system))
+(use-modules (gnucash utilities))
(use-modules (gnucash report report-system test test-extras))