Skip to content

Instantly share code, notes, and snippets.

View psybers's full-sized avatar

Robert Dyer psybers

View GitHub Profile
@psybers
psybers / apply-interest.js
Last active May 8, 2024 15:40
Automatically insert Actual Budget transactions for loan interest. Add "interestRate:0.xx interestDay:yy" to the account note, where 'yy' is the day of month to insert the transaction. Run `npm install` to install packages, then `node apply-interest.js` to run it (I run it in a daily cron).
require("dotenv").config();
const api = require('@actual-app/api');
const payeeName = process.env.IMPORTER_PAYEE_NAME || 'Loan Interest';
const url = process.env.ACTUAL_SERVER_URL || '';
const password = process.env.ACTUAL_SERVER_PASSWORD || '';
const sync_id = process.env.ACTUAL_SYNC_ID || '';
const cache = process.env.IMPORTER_CACHE_DIR || './cache';
@psybers
psybers / package.json
Created April 6, 2024 02:24
Finds uncategorized transactions in Actual Budget and asks Chat GPT to suggest the category.
{
"dependencies": {
"@actual-app/api": "^6.7.0",
"dotenv": "^16.4.5",
"openai": "^4.33.0"
}
}
@psybers
psybers / ncdc.sh
Last active February 21, 2017 20:37 — forked from tomasdelvechio/ncdc.sh
Download a weather dataset from the National Climatic Data Center (NCDC, http://www.ncdc.noaa.gov/). Usage: ./ncdc.sh 1901 1930 # download weather datasets for period from 1901 to 1930.
#!/usr/bin/env bash
# global parameters
g_tmp_folder="ncdc_tmp";
g_output_folder="ncdc_data";
g_remote_host="ftp.ncdc.noaa.gov";
g_remote_path="pub/data/noaa";
yum install -y wget