Skip to content

Instantly share code, notes, and snippets.

@hraftery
hraftery / Installing_nRF_Connect_SDK_on_macos.md
Last active July 27, 2021 21:25
Installing nRF Connect SDK on macos

Installing nRF Connect SDK on macos

Conditions

  • Applicable to the nRF9160-DK and probably other platforms the SDK supports.
  • Correct as at 2021-04-07. Many fast moving parts so will likely age quickly.

Instructions

@hraftery
hraftery / merge_roam_daily.pl
Created April 18, 2021 09:28
Merge all the daily pages from Roam Research into one markdown file with date headings
#!/usr/bin/perl -w
use Time::Piece;
%dailies = ();
foreach my $daily (<*.md>)
{
my $fn = $daily; #store original for use later
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hraftery
hraftery / Install_QuestDB_On_FreeBSD.md
Last active January 22, 2023 10:08
Instructions on not just downloading and running QuestDB on FreeBSD, but putting the requirements elements in a sensible location and configuring it to run on boot.

There does not seem to be any guidance available for installing QuestDB on FreeBSD. An enquiry on Slack created helpful suggestions, but nothing directly actionable.

For posteriority I decided to create my own installer. This seems to do the trick, and is modelling on the Homebrew configuration, for lack of a better idea.

As root:

pkg install bash
curl -LO https://github.com/questdb/questdb/releases/download/6.0.4/questdb-6.0.4-rt-freebsd-amd64.tar.gz
tar xvf questdb-6.0.4-rt-freebsd-amd64.tar.gz
cd questdb-6.0.4-rt-freebsd-amd64
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hraftery
hraftery / Alphametics.hs
Created November 10, 2021 03:00
My Haskell solution to the "Alphametics" challenge at https://exercism.org/tracks/haskell/exercises/alphametics
module Alphametics (solve) where
import Data.Char (isSpace)
import Data.List (nub, intersect, transpose, elemIndex)
import Data.Maybe (fromJust)
solve :: String -> Maybe [(Char, Int)]
solve input = if length solutions == 1 then Just $ zip charMap (head solutions) else Nothing
where
toRowsOfChars = wordsBy "+=" -- create list of words from input (["SEND","MORE","MONEY"])
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"
@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;

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 / 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