Quarantine life.

Mar 22 2020

We're rapidly nearing the end of our first month of quarantine due to the covid-19 pandemic.  I've been working from home since the last week of February, which isn't anything particularly new to me because we have mandatory work-from-home days at least once a week at my day job.  Coincidentally, a few days in was when our landlord's scheuled demolition and renovation of the kitchen began.  This meant that we were down three rooms in the house - no kitchen, no dining room, and no living room - due to having to relocate everything.  Lyssa and I also had some amount of stuff in our respective offices, which made life less than fun for a while.  However the kitchen is back online, so we've been cleaning up the aftermath of the construction work and shaking down the new appliances.  Not only do we have more room in the kitchen, but we now have a dishwasher and a sink that's not painfully tiny.  The first pot of coffee and the first dinner were made in our new kitchen on Saturday.

Shopping for supplies in the Bay Area has been both easier and harder than expected.  Easier because people have on the whole been pretty cool toward each other.  No pushing, no shoving, only one instance of almost-violence and that was some weeks ago.  On the other manipulator, it's been harder because just about every shelf has been completely denuded of everything from toilet paper (the butt of many jokes which write themselves) to cleaning agents to vitamin supplements.  It's one thing to hear people talk about this happening, but it's quite another to actually see it in every store you visit.  It's a vicious cycle.  While I don't know for sure I think I can reconstruct the overall pattern of thought here: People are afraid that there will be runs on everything essential, from food to distilled water to stuff they might be running low on (such as salt or dishwashing detergent).  They don't want to get caught out.  So they flock to the stores to stock up on everything before there is nothing left.  Unfortunately, this is the very cause of those shortages.

So it goes.

Click for the rest of the article...

Nifty things to do with Searx.

Mar 08 2020

Not too long ago I was noodling over a problem: I wanted to break up the scheduling queues in Huginn to make my fleets of agents a little more efficient when the execute.  The best way I could think of was to make some of the schedules stochastic - periodically have an agent roll some dice and depending on what comes up decide whether or not to trigger the agents downstream.  So, of course I started looking for a random number generator that would basically roll 1d10.  However, the Liquid templating language that Huginn uses internally doesn't have any function to do this and I didn't feel like bodging one together even though it would probably work well enough for my purposes.  So, off to my local Searx instance to see what I could scare up.

It was then that discovered (or re-discovered, maybe) some interesting things about the meta-search engine in question.

Click for the rest of the article...

Neologism: 90/10 rule

Feb 28 2020

90/10 rule - phenomenon - When 90% of all the stuff management tells you to deploy is monitoring and orchestration software.  The remaining 10% is actual make-us-money software.

Neologism: Smoke and mirrors system administration

Feb 28 2020

smoke and mirrors system administration - noun phrase - When you bring a problem to your support team and they go silent for hours to days at a time.  No amount of poking and prodding is sufficient to get anyone on the team to respond to your requests for status updates.  When they finally get back to you they say that nothing's wrong and you must have made a mistake.  Your thing is now unbroken.  They never tell you (or anyone, for that matter) what they fixed or how they fixed it.

Using Nginx to spoof HTTP Host headers.

Feb 02 2020

EDIT: s/alice.bob.com/alice.example.com/ to fix part of the backstory.

Let's say that you have a server (like Prosody) that has one or more subsystems (like BOSH and Websockets).  You want to stick them behind a web server like Nginx so that they can be accessed via HTTP - let's say that you want a browser to be able to communicate with those subsystems for some reason.  Or more likely you have a web application that needs to communicate with them in the same way (because Javascript).  Assuming that the above features are already enabled in Prosody, you would put something like this in one of your Nginx config files for, let's say for the sake of argument alice.example.com:

...
    location /http-bind {
        proxy_pass http://localhost:5280/http-bind;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_buffering off;
        tcp_nodelay on;
    }
    location /xmpp-websocket {
        proxy_pass http://localhost:5280/xmpp-websocket;
        proxy_http_version 1.1;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $remote_addr;
        proxy_read_timeout 900s;
    }
...

location is the part of the URL Nginx knows it has resources for.  proxy_pass tells Nginx that, whenever something tries to access that part of the URL (https://alice.example.com/http-bind or https://alice.example.com/xmpp-websocket) it should transparently proxy the connection to the given URL (http://localhost:5280/http-bind or /xmpp-websocket, depending) and forward responses back to the client).

But what if you did something a bit less sensible, like put the client on a different host?

Click for the rest of the article...

Neologism: Quantum veracity

Jan 19 2020

quantum veracity - When you're not sure if somebody's full of shit or not, so you act polite until you can find out one way or the other, while simultaneously leaving yourself an escape route.

The Doctor's joint care regimen.

Feb 16 2020

Obligatory disclaimer: This is not medical advice.  Consult your regular physician.  Use at your own risk.

Empty one envelope of vitamin C supplement powder (I like Emergen-C) and one envelope of Knox unflavored, unsweetened gelatin into a mug.  The Emergen-C is to make it taste better..

Fill with cold water, stirring briskly with a spoon.

Chug.

Do this two (ideally) or three (maximum) times a week.

Sculpting castles in the sands of Time.

Feb 15 2020

I'm sitting in yet another coffee shop as I write this.  Once again it's my birthday and I'm trying to figure out what I'm doing with my life and where I'm going.  I've just turned 42 which, as Douglas Adams would have it means I now have the answer to life, the universe, and everything.  Or I am the answer.  Or something like that.  I don't even know what I'm having for dinner tonight, let alone know what life is or is for so I'm probably not the best person to ask.

No, I'm not going to post a link to the video for Birthday this time, though it would be appropriate.  I figured I'd give something else a try for once.

Looking back I don't feel noticeably different since last time.  I've got less hair on my head these days because most of it's migrated to my ear canals.  The hair that I still have is steadily turning silver and it's the first thing I see every time I look in the mirror.  I don't particularly think that I need to take better care of my joints but it never hurts, right?  Mostly it's my perception of Time that's changing.  Days seem to go by a little faster regardless of whether I'm actively doing something or just screwing around.  Weeks certainly seem to fly by these days.  I still don't know what happened to the holiday season of 2019.ev, and the last HOPE seems just as close as the one coming up this summer.  Things happen, and then they don't, and then something else happens.  I still don't know how I feel about that.

I've been reading in the car less and looking around more.  I'm not sure why.

Folks I've known for multiple decades aren't just married anymore, their kids are growing up and doing cute things (as children are wont to do).  Somewhere in between the two events, in the blink of an eye, children were born.

Fixtures of my life - favorite coffee shops, conventions, book stores - are steadily going away.  Most of them aren't being replaced with anything new, they're staying closed, silent, slowly decaying.  I've been looking elsewhere for things.

Click for the rest of the article...

Integrating Huginn with a Matrix server.

Jan 19 2020

Throughout this series I've shown you how to set up a Matrix server and client using Synapse and Riot, and make it much more robust as a service by integrating a database server and a mechanism for making VoIP more reliable.  Now we'll wrap it up by doing something neat, building a simple agent network in Huginn to post what I'm listening to into a Matrix Room.  I have an account on libre.fm that my media players log to which we'll be using as our data source.  Of course, this is only a demonstration of the basic technique, you can, in theory plug whatever you want into a Matrix server because the API was designed to be extensible.

We're going to assume that you've already set up a Matrix server and have an account on it, and that you have access to a working Huginn install.

Click for the rest of the article...

Making a Matrix server STUN-enabled.

Jan 18 2020

Previously in this series I showed you how to migrate a Matrix server to use Postgres, a database server designed for busy workloads, such as those of a busy chat server.  This time around I'll demonstrate how to integrate Synapse with a STUN/TURN server to make the voice and video conferencing features of the Matrix network more reliable.  It's remarkably easy to do but it does take a little planning.  Here's why I recommend doing this:

If you are reading this, chances are you're behind a NATting firewall, which means that your device doesn't have a publically routable IP adresss.  In addition to rewriting all of your network traffic so that it doesn't look like it's coming from a private network, the firewall is also doing port forwarding to pass inbound traffic to your device (least of all replies from web servers), again so it doesn't look like you're behind a firewall.  This works just ducky with TCP traffic because TCP sets up bidirectional connections; TCP packets are acknowledged every time which has the additional effect of letting the firewall keep the connection together.  VoIP traffic, on the other hand, tends to use UDP, which is not connection-oriented.  One way to look at UDP is as a fire-and-forget protocol: The packet gets launched toward its destination, and it may or may not arrive depending upon network core weather patterns, luck, the phase of the moon... packets may also not necessarily arrive in the correct order.  It's an inherently unreliable protocol.  This is what makes it useful for streaming data traffic like audio or video, because it's inherently low latency.  If you've ever been on a call and heard it break up or go into robot mode (or for that matter, seen a television program glitch out) this is probably what happened.  The occasional glitchout is the price you pay for a relatively snappy data stream.

Click for the rest of the article...