Skip to content

Instantly share code, notes, and snippets.

@hraftery
hraftery / assert.h
Created February 1, 2024 23:18
System-wide assert routines to suit embedded programming
/**
* \file
*
* \brief Common assert functionality to suit embedded development.
*
* \author Heath Raftery
* \date March 2020
*/
#ifndef ASSERT_H_
@hraftery
hraftery / common.h
Created October 12, 2023 01:05
Project wide includes, macros and types.
/**
* \file
*
* \brief General utility functions
*
* \author Heath Raftery
* \date July, 2016
*/
#ifndef __COMMON_H__
@hraftery
hraftery / gateway-pi.md
Last active October 26, 2023 21:08
Gateway-Pi : connecting a HiLink cellular dongle to a Billion router

The Job

flowchart LR
    a[Cellular Dongle<br />Huawei E3372h-608] --> |USB| b[Raspberry Pi]
    b-->|Ethernet| c[Billion Router<br />BiPAC 7800NXL]
    c-->|Ethernet/WiFi| d[Home Broadband]

The Why

@hraftery
hraftery / FetchTimesheetEntriesFromClickUp.gs
Last active April 3, 2023 01:57
Build on FetchTasksFromClickup to pull the time tracking data into a timesheet view.
/*
* FetchTimesheetEntriesFromClickUp
*
* Fetch time tracking entries using the ClickUp API and return the data in calendar format as a two-dimensional array.
* This can be used in a Google Apps Script to pull time tracking data into a Google Sheet, to suit entry into Harvest.
*
* Author: Heath Raftery
* License: This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a
* letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
@hraftery
hraftery / FetchTasksFromClickup.gs
Created November 7, 2022 02:51
Fetch tasks from the ClickUp API, returning the fields specified as a two dimensional array.
/*
* FetchTasksFromClickup
*
* A simple function to fetch tasks using the ClickUp API and return the fields specified as a two-dimensional array.
* This can be used in a Google Apps Script to pull task data into a Google Sheet.
*
* Author: Heath Raftery
* License: This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 International License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a
* letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.
/*
* Perform a basic text search of all (internally generated) chat messages in Jellyfish, like Omnisearch used to do for Flowdock.
*
* Usage:
* 1. Change `theSearchPattern` to the string you're searching for
* 2. Enter line in the Console in the Developer Tools in the browser, after logging into Jellyfish.
* 3. The first 20 results will appear in the console. To see more, press up and return to re-enter the last command.
*
* In case it wasn't clear, this is a terrible hack and not expected to be fit for anything beyond amusement.
*/
@hraftery
hraftery / getmail_on_dsm7.md
Created July 31, 2022 13:09
Installing getmail on Synology Diskstation DS920+ with DSM 7

Installing getmail on Synology Diskstation DS920+ with DSM 7

  • Did a survey of alternatives and am not convinced there's better out there. The built-in Synology stuff might be capable, but I don't think it's going to be as set-and-forget. So getmail it is.
  • Right, no getmail in the official Synology repositories, but it is in ipkg apparently. So just install that like last time right? Nope. It's opkg now, and the installer doesn't work on DSM 7!
    • Wow, not getting far.
  • Okay, official instructions work just fine (the DS920+ is x86_64, according to uname -a), but need to wait for a reboot and I still have 5 hours of backup copying to go.
  • So in meantime, notice that the opkg getmail package seems to be v4 anyway, and v5 is available. So why not just install it manually?
wget https://pyropus.ca./software/getmail/old-versions/getmail-5.16.tar.gz # note

Email Migration with Dovecot

Notes on migrating 20 years of personal email from dovecot on an iMac to Synology Mail Server on a DS920+.

Preparation

setting FROM TO
host corroboree.hrsoftworks.net REDACTED
version 2.2.18 2.3.5.2 (a83ad21)
@hraftery
hraftery / github-markdown-light.css
Last active November 15, 2022 09:58
CSS derived from sindresorhus/github-markdown-css to suit MacDown. Instructions (you can skip steps 1 to 3!): https://twitter.com/HeathRaftery/status/1517372992757518336
body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
margin: 0;
color: #24292f;
background-color: #ffffff;
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
font-size: 16px;
line-height: 1.5;
word-wrap: break-word;
umount: /dev: target is busy.
mount: /sys/kernel/debug: nodev already mounted on /sys/kernel/debug.
QFactoryLoader::QFactoryLoader() checking directory path "/qt/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/qt/plugins/platforms/libqeglfs.so"
Found metadata in lib /qt/plugins/platforms/libqeglfs.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"eglfs"