Skip to content

Instantly share code, notes, and snippets.

View willjobs's full-sized avatar

Will Jobs willjobs

View GitHub Profile
@willjobs
willjobs / ynab-google-sheets.js
Last active May 2, 2024 17:52 — forked from notself/ynab-google-sheets.js
Revisions to the original gist to add columns, show split subtransactions on multiple rows by default, fix time discrepancies, and add an indicator of the last data pull
function YNABAccounts(accessToken, budgetId) {
const accounts = _getBudgetAccounts(accessToken, budgetId);
if(accounts == null) {
return null;
}
const columns = ["Name", "Type", "Budget", "Closed", "Balance"];
const rows = accounts.map(function (acc) {
return [
@willjobs
willjobs / megabackup.sh
Last active October 1, 2017 10:14 — forked from matteomattei/megabackup.sh
Mega server backup using megatools (revised for updated megatools, serverpilot app locations, and to include timestamps)
#!/bin/bash
now=$(date +"%T")
echo "Starting backup at ${now}..." | tee -a /root/megabackup.log
SERVER="servername"
DAYS_TO_BACKUP=7
WORKING_DIR="/root/backup_tmp_dir"
BACKUP_MYSQL="true"