Skip to content

Instantly share code, notes, and snippets.

View JC5's full-sized avatar
💭
Remember when you had to change your nickname on MSN to change your status?

James Cole JC5

💭
Remember when you had to change your nickname on MSN to change your status?
View GitHub Profile
@JC5
JC5 / keybase.md
Last active September 6, 2023 18:27
keybase

Keybase proof

I hereby claim:

  • I am jc5 on github.
  • I am jc5 (https://keybase.io/jc5) on keybase.
  • I have a public key whose fingerprint is 02F4 046C 4B23 6E06 0957 1612 B49A 324B 7EAD 6D80

To claim this, I am signing this object:

@JC5
JC5 / webhook-receiver.php
Created January 15, 2021 19:56
A basic script to receive and validate Firefly III webhook messages
<?php
declare(strict_types=1);
/*
* webhook-receiver.php
* Copyright (c) 2021 james@firefly-iii.org
*
* This file is part of Firefly III (https://github.com/firefly-iii).
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
@JC5
JC5 / single_expenses.md
Created December 1, 2022 05:29
Sort accounts by usage and amount

This is MySQL but should work as expected in other databases.

 SELECT COUNT(transactions.id)   AS transaction_count,
       SUM(transactions.amount)  AS total,
       accounts.name
FROM   transactions
       LEFT JOIN transaction_journals
              ON transactions.transaction_journal_id = transaction_journals.id
 LEFT JOIN accounts
@JC5
JC5 / liabilities.md
Last active March 11, 2023 04:30
Liabilities in Firefly III v5.7 vs v6.0

Liabilities in Firefly III v5.7 vs v6.0

This page documents how Firefly III handles outgoing loans (liabilities). For example: you borrow money to friends and family. In Firefly III you select "I am owed".

Introduction

In Firefly III v6.0 the way these liabilities are handled will change. This means change for you as well.

How it works in v5.7

<?php
/**
* autosave.php
* Copyright (c) 2020 james@firefly-iii.org
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
@JC5
JC5 / summary-of-the-year.md
Last active November 23, 2023 05:09
Spent and earned in 2023

Firefly III

These queries can help you get an overview of your expenses and income in 2023. Although Firefly III contains many useful reports, sometimes it's helpful to have a quick overview of what you want to know exactly. And although the year is not yet over, these queries can give you valuable insights already.

These queries group transactions by "expense account", so they will probably only work if you use the expense account to indicate the exact shop or brand you spent your money at.

Big single expenses in 2023

This query shows your biggest single expenses this year, spent at one place you have not gone back to.