Experimenting with hypothes.is

The downside to a static website generator is the inability to have comments on a blog; the upside to a static website generator is the inability to have comments on a blog.

Well, sort of. Useful comments are good, sadly on most blog sites I ever had to look after, about 99% (figure plucked from the air) are spam. But sometimes the occasional helpful comment or thanks does appear, which it's a shame to lose.

One possible solution to this, amongst many other problems, is the system provided by Hypothes.is, which intends to implement Open Annotation standards on websites, (once the standard is a standard anyway. I'm experimenting with this, as you can tell by the appearance on the right hand side of your browser, assuming you are a human being reading this page, of a pop out sidebar which you can use to annotate anything on the page, or read and respond to previous comments/annotations.

It doesn't quite work yet as a blog commenting system, for example to search for any comments left on my site, I have to filter by URL instead of by domain. For the moment, I'm filtering by tag, so if you want me to see your comment, use "tiro" as the tag. Spammers, please don't apply.

If this is left a public comment, it can then by discovered by filtering the Hypothes.is feed like so:

https://hypothes.is/stream?q=tags:tiro

or as an Atom feed:

https://hypothes.is/stream.atom?tags=tiro

which can be subscribed to be a feed reader of your choice. For notifications, I'm hooking it up to Pushover via IFTT, but Slack would be another route.

What I Made This Week #1

Cooking

Orange, Lemon and Cardamon Biscuits from a recipe by Ruby Tandoh

(results: edible but not zesty enough. Or even at all. More orange & lemon next time, probably with icing as well, as a bit dry.)

Electronic

Raspberry Pi Display stand.

DIY

A Shelf.

A Roller blind.

Reading

Bleak House by Charles Dickens

Lots of New Scientist & London Review of Books back-issues catch-up.

Pokemon Go

Lots of this, although decreasing interest.

Testing Loop Energy Monitor

After going through all the options earlier, I eventually went for the one I'd thought about months ago (I very much follow the not-actually a Churchill quote but should be in my decision making).

Sent off for my free Loop trial, 45 days to test the device and then you can either pay a one off costs (around £50) or pay monthly to keep using it. So far the graphs look pretty but need more data to see anything useful. No way to export the data out either at present, but an API is "in the works".

Mystery Processes I: kthrotld

Another series of posts looking into what all those strange processes that appear in a ps listing on Linux are doing (obviously, I take it as read that we all know the processes that appear in a ps listing in square brackets are linux kernel threads upto good healthy kernelly stuff, but what stuff?)

Starting, for no particular reason, with kthrotld.

I have to admit I had expected I could just search for each of the process names and find helpful bits of documentation that I could compile down into one pithy summary, such as "kthrotld throttles the wizbang I/O widget" but I seemed to have picked a hard one to start with, as nothing is currently easy to find. A previous quest along the same lines to document kernel threads

So, digging into the kernel source, in linux/block/blk-throttle.c there is:

 kthrotld_workqueue = alloc_workqueue("kthrotld", WQ_MEM_RECLAIM, 0);

which creates the thread. And the thread is 'controlling IO bandwidth on a request queue', by throttling requests.

Visualising git commits

Just a reminder mainly for myself of the wonderful https://github.com/acaudwell/Gource programme to turn a git commit history into a wonderful animated spring graph visualisation.

For lengthy projects I'm using:

/gource -s 0.5 -a 1 -f -r 25 -o [output.ppm] [Git directory]

ffmpeg -y -r 25 -f image2pipe -vcodec ppm  -i [output.ppm] -preset ultrafast -crf 1 -threads 0 -bf 0 [output.mp4]

(alternatively can be piped straight from gource to ffmpeg via stdout/in)

Everyday Unix Commands Revisited

Inspired/-Stolen- from features on two great podcasts, Ubuntu Podcast & the Linux Action Show podcast (both well worth a listen) looking at command line programmes or scripts; I wanted to start forcing myself to take new looks at everyday commands, especially as I've often not noticed they have (sometimes) changed entirely since that dim & distant day I first read their man page. Or sometimes a venerable command should be gently ushered off to the Unix Retirement Home, with a youthful replacement command coming along to take it's place. Or somesuch. So, as and when I find them (and can be bothered) this is a blog feature. And to help myself, here are a list to get going with:

(mixture of old commands, e.g. is there a new less, cat, etc; new commands thaat do some useful things, e.g. code line count, and just new commands)

  • -more-, -less-, most
  • -cd-, j and friends
  • -bc-, genius
  • cloc

Setting up a home sensor network

Every year or so I have the (unoriginal) idea of monitoring temperature in my flat to work out if my heating is throwing money away by coming on at the wrong times. And in the last few years various home temperature/heating monitoring systems have become available to do this:

Market Summary (as of Apr 2016)

Product Price Pro Con Notes for my usage
Nest £249 Looks good No external sensors (one room only) Doesn't work for me
Hive Doesn't work for me
Honeywell Lyric
Honeywell Evohome £249 + £50 Looks good Ludicrously expensive Not worth it & doesn't work for me
EcoBee Doesn't work for me
Apple Homekit It's Apple & doesn't work for me
Netatmo Doesn't work for me

So, not much point buying one of those. But really all I want is a temperature sensor + wifi/bluetooth on a cheap chip and some software that shows the details on a pretty graph. I know all of these things are doable, but no-one seems to produce a product that brings them all together well. The best option I can see at the moment would be a Raspberry Pi Zero + temp sensor + bluetooth chip, so around £10 per sensor; but then it would require a power supply (battery power draw is still rather high so would need recharging daily, see http://raspberrypi.stackexchange.com/questions/40181/what-can-i-use-to-power-my-raspberry-pi-zero-with-rechargeable-battery )

Equally, I can't find a pretty open source sensor monitoring system that takes in different sensor readings (temp, humidity, pollution etc) that displays them nicely. The best one so far seems to be: but it's a bit of a beast (in the nicest possible way).

Commercials systems to do this similiar things include:

Product Price Notes
Sense by Hello $129 each Multiple sensors for temp, pollution, light, noise, intended mainly for bedroom to monitor sleep

The search continues... (will update this post as and when)

TuxOnIce and Debian hibernate *hell* purgatory

Following on from the pain of hibernate almost bricking my Intel NUC, the fix for that seems to mean I'm no longer able to use the kernel hibernate method (it just hangs and needs power cycling). So I've gone back to good old reliable TuxonIce. Except it seems like nobody else is using it on Debian 8/Jessie as I can't find any guide to getting it setup (even though there is the user interface package tuxoniceui still in the stable repo.). (To be honest, I was amazed TuxOnIce is still a thing, and not part of the kernel years ago. Seems to be a major disagreement stopping it being merged).

So far, after a few hours of false starts and panics (both kernel and mental), I've cobbled together from lots of other people's work something that sometimes hibernates and powers off successfully, and once has resumed, but even then caused a kernel panic, as it seemed to have not enabled all the CPU cores. So not quite there yet... (will update this post as I work on it)

Read more…