RSSAmplifier

Blog

Pete Keen

Essays and projects by Pete Keen

petekeen.netRSS feed ↗136 posts

Latest posts

Homelab Ingress With Deterministic IPv6

In my last post I talked in general about how my homelab is set up.
In this piece I'm going to explore one of the more interesting aspects of the stack in more depth: my web ingress. 
 The canonical homelab Docker-based ingress is Caddy, Traefik, or Nginx Proxy Manager sitting on a shared Docker bridge with every other web-facing container.
This is easy and understandable and also a…

Rebuilding My Homelab with Compose, Ruby, IPv6, and No Kubernetes

A little less than a year ago I wrote : 
 
 Everything is in shambles. 
 
 
 One machine is dead and probably not coming back.
Services are randomly scattered amongst the survivors.
My Kubernetes project is kinda-sorta paused. 
 
 This post is an addendum to that one, where I'm going to give an overview of what I've settled on, as much as one can settle in a…

Homelab Failure Domains

Everything is in shambles. 
 One machine is dead and probably not coming back.
Services are randomly scattered amongst the survivors.
My Kubernetes project is kinda-sorta paused. 
 I'm unnerved and want to get it all sorted out, but I need to do some thinking out loud first. 
 
 My infrastructure currently consists of: 
 
 
 Omicron, a Kubernetes cluster that is…

Kubernetes at the (homelab) Edge

As I've mentioned before, the RF environment in my house is difficult.
The house layout is roughly: 
 
 single level house, half of which has a basement under it 
 single level office / mother-in-law-suite / ADU / whatever you want it 
 two car garage in between 
 shed in the back yard 
 
 
 The house and ADU are built out of cinder block and brick on the…

Switching to Kubernetes


 And you may ask yourself, "How do I work this?" 
And you may ask yourself, "Where is that large home server?" 
 
 Once upon a time I had a Mac mini. It was hooked up to the tv (because we only had the one) and it ran Plex. It was fine. 
 Later, my new spouse and I moved across the country into a house.
I decided that I should get a server because I was going to be a big…

Using ESPHome Without the Home Assistant Addon

The "blessed" flow for using ESPHome is the Home Assistant ESPHome Addon.
This works well!
It has a nice editor and it takes care of some housekeeping tasks for you.
If you don't already have a comfortable development workflow it's a very nice way to start. 
 If you do already have a working style that doesn't involve a web UI and a browser editor you can still use ESPHome, you…

Automatic Finances


 My friend Amy Hoy recently tweeted about financial planning and personal finance.
This particular tweet stuck out to me: 
 you'd probably think given my love of money that i'd be all over financial planning, but truly i only enjoy earning it and spending it. saving it feels like… freezing cake. i guess you could do it, but why, you have cake — Amy Hoy ✨ (@amyhoy) February 19,…

Automatic Cash Management

The Setup 
 
 One Fidelity Brokerage Account ("brokerage") 
 One Fidelity Cash Management Account ("CMA") 
 One Fidelity 2% Cash Back Credit Card 
 One Chase Freedom Unlimited Credit Card 
 One Amazon Prime Visa 
 
 How Money Flows 
 
 Payroll direct deposited into brokerage 
 All non-mortgage recurring expenses are paid with the Fidelity card 
 All…

Automatic Investing

The Setup 
 
 Fidelity Brokerage Account ("brokerage") with margin enabled 
 Fidelity Roth IRAs 
 Fidelity Solo 401K 
 Fidelity Multi-Asset Index Fund (FFNOX) 
 iShares Core Aggressive Allocation ETF 
 
 How Money Flows 
 
 Every investable dollar is in FFNOX across all non-401k tax advantaged accounts 
 Every investable dollar in taxable accounts is…

ESPHome Server in Python

Last year I installed holiday lights on my house ( previously ).
At the time I chose a controller that had the following key qualities: a) cheap, b) worked with WLED, c) cheap. 
 After using it for a season I discovered that the reason why this controller is so cheap is because it uses an ESP8266, which is fine ,
but it doesn't play well with my setup.
For example, if I enable the…

The Simply Complicated Automatic Sprinkler

I've never owned a sprinkler before.
I've just never had a need for one. 
 Until this past Monday, when I installed some grass seed and couldn't promise myself that I'd water it twice a day every day for the next month as one is supposed to do. 
 A normal person would just buy a mechanical or stand-alone timer device and be done with it.
Not me.
No way. 
 My first thought…

Using a Static JSON File in Home Assistant

Recently I found myself needing to bring some JSON from a file into a Home Assistant sensor.
Specifically, the electricity rates for my power company are woefully out of date on OpenEI so I decided I could just maintain the data myself. 
 Home Assistant doesn't have a direct way to read JSON data from a file into a sensor.
There's the File platform which has a promising name but is…

Using Eufy Permanent Outdoor Lights with WLED

For as long as I've known her, my wife has been very into decorating for the holidays.
She loves it. The traditions, the cherished ornaments, the stockings on the wall, etc etc. 
 I'm ok with decorating. It's fine. It's not my favorite thing. 
 The one thing I don't like at all, though, is putting up outdoor lights.
Getting up on the roof at our previous house was a complete…

Using a Secondary Klipper for Printer Power Control

I recently got a 3D printer, a Sovol SV06 Plus.
Remarkably, this has been a net positive for almost every aspect of my life.
My kids are into it, my spouse is browsing filament colors, and I can print whatever little project boxes my heart desires. 
 We're not here to talk about that, though.
We're here to talk about controlling the power for this printer in possibly the most…

Backyard Fiber Update 2

You ever have one of those moments where you realize that what you've actually been doing is not at all
what you thought you were doing? 
 Yeah. I had one of those a couple weeks ago. 
 See, I thought I was just installing some fiber in the back yard to get my shed gear off of a lightning-prone shallowly
buried cat5e connection.
What I actually ended up doing is rebuilding my…

Backyard Fiber Update 1

Today is day one of three installation days. Yesterday they came and dug the trenches and today they're starting to put in the electrical and gas for the generator. 
 
 Tomorrow and possibly the next day are for actually hooking everything up. 
 When that's all taken care of I'll still be waiting on FS.com to build and ship the fiber assemblies that will go in the conduits. 
 Sigh.…

Backyard Fiber

We moved into our current house in the middle of 2020.
Between then and now (end of March 2023) we've experienced at least one power outage per year longer than 12 hours, the most recent of which was five days due to a historically bad ice storm.
We were lucky to get a hotel room that let us stay the entire time, but we still had to discard a fridge and a freezer full of food. 
 Even…

Homeprod Management with Docker Compose

Recently I decided to change how I manage my homeprod environment (home production, i.e. the things that other people in my household rely on and tell me if they're down).
I moved everything over to docker-compose stacks managed with a small(ish) shell script.
Skip down a bit if you don't want backstory. 
 
 Backstory 
 The situation before was a mish mash of various things…

Setting up an isolated work VLAN with VyOS

I treat employer-provided hardware as hostile entities on my network.
I have no control over them and I have no idea what invisible scanning software they've installed. 
 Previous to now I set up a dedicated guest wi-fi network which provides a sort of client isolation, but
this wasn't quite enough because I want my work machine to also have an ethernet connection.
Therefore, I…

Ruby Service Objects with Sorbet

I really enjoy working with Sorbet .
Actually I really like working with T::Struct , everything else that Sorbet provides is sort of just a bunch of nice bonus content.
Today I'm writing about a small technique that I think illustrates the value of T::Struct and friends. 
 
 Recently I was working with a series of service classes that were all structured like this: 
 class…

Z-Wave Controllers using Dell Wyse Thin Clients

About two years ago my family and I moved into our (hopefully) forever home.
This house has an unfortunately large number of exterior doors and is situated
on a main road, so we wanted to make sure that most of the doors are locked
without having to patrol the doors before bedtime every night. 
 To that end, I put z-wave locks on every door and built out a z-wave network
so…

My Virtualized Router

This post is mostly for me to remember what I did, but feel free to follow along. 
 Updates 
 
 2021-11-25 
 2021-11-30 
 2021-12-10 
 
 
 Original Post 
 Recently I decided to switch jobs, for a number of reasons that aren't germane to this post.
I haven't had any proper time off for years so this time I decided to take a big chunk of time between leaving…

Tiller, Ledger, and Sorbet

Tiller + Ledger 
 Thirteen years ago I started tracking my finances using a tool named Ledger .
Up until 2018 I hand-entered every penny into my ledger files, which absolutely had value but eventually I decided that I wanted to automate things as much as I could. 
 I happened upon Tiller which scrapes bank accounts and puts the data into a Google spreadsheet.
Importantly, Tiller…

Using Que instead of Sidekiq

A project I've had on the back burner for quite awhile is my own little marketing automation tool.
Not that existing tools like Drip or ConvertKit aren't adequate, of course.
They do the job and do it well. 
 I enjoy owning my own infrastructure, however, and after Drip changed direction and raised prices I found myself without a home for my mailing list.
I thought, why not now?…

Automatic Insurance

The Setup 
 
 $1.5 million of term life insurance on me 
 A smaller amount of term life insurance on my wife 
 A private disability insurance policy on me that pays $5,000/mo if I can't program computers anymore, for up to 2 years 
 Employer sponsored short and long term disability insurance 
 Employer sponsored health insurance 
 Auto, home, and umbrella insurance…

Using Let's Encrypt Without certbot

In my last post I talked about what a CDN is and why you might want one.
To recap, my goal is automatic, magical DNS/SSL/caching management.
Today we're going to talk about one aspect of this project: HTTPS and SSL. 
 SSL, or Secure Sockets Layer , is the mechanism web browsers use to secure and encrypt the connection between your computer and the server that is serving up the content…

What is a CDN and why do I need one?

In my earlier post I talked about how I'm building my own content delivery network (CDN) but I didn't really go into what a content delivery network even is or why someone would want such a thing. A little back story is probably in order. 
 
 What is a content delivery network? 
 A CDN is a set of computers distributed around the globe that all point back at the server where your…

My Own Private CDN

Hosting my own CDN has long been a completely irrational goal of mine.
 Wouldn't it be neat, I'd think, if I could tweak every knob instead of relying on CloudFront to do the right thing? 
Recently I read this article by Janos Pasztor about how he built a tiny CDN for his website. This just proves to me that at least it's not an uncommon irrational thought. 
 Yesterday I decided to…

VMSave has made over 10,000 calls

VMSave has made over 10,000 total calls as of yesterday.
That's an astounding number to me.
Originally VMSave was a tiny ruby script that I made to save my wife's mom's outgoing voicemail message. With her encouragement I made it into a full-fledged service. I never thought it would get this big, and yet here we are. 
 
 Here's some stats: 
 
 8,690 completed recordings…

An Open Licensing Organization for Open Source Software

Mike Perham tweeted earlier today: 
 Could OSS use an ASCAP royalty model for funding developers? https://t.co/X2yKO8jYRQ — Mike Perham (@mperham) June 5, 2018 
 ASCAP is a voluntary organization in the US (there are others in the US and multiple other organizations internationally) that sublicenses music to radio stations and other public performance places. Music creators register…

Notes on Shutting Down an S-Corp

A little over a year ago I described how I have my businesses set up in My Miniature Corporate Empire .
Between then and now quite a few things have changed, the biggest being that I'm now employed by egghead , which had previously been my primary consulting client. 
 Over the past few months it's become very clear to me that this W-2 gig is better in every practical way than how I had…

Why your SaaS application should support SAML

Your SaaS application should support SAML (Security Assertion Markup Language) if you're at all interested in big fat contracts from large enterprise customers. And why is that? 
 One word: money. Large enterprise customers pay quite a lot of money for services that help them do their work with a minimum of fuss. They want to do as little management of your service as they can possibly get…

Adventures in Stock Picking

About a year and a half ago I started buying shares in individual public companies rather than buying
shares of index funds. I did this because I thought it was fascinating and because I thought I could
do a good job, at least matching the performance of the market as a whole. This week I decided
to end the experiment and go back to index funds. 
 This is part a chronicle of my…

My Miniature Corporate Empire

This post is mostly for posterity so I don't forget why and when I did this stuff. If you find small-scale business stuff interesting you'll like it. 
 When I initially published my first book Mastering Modern Payments in 2013 I just did it myself,
with no business backing it. I had a separate personal checking account where the Stripe deposits ended up, I deducted business expenses,…

We (Probably) Have Two Years of ACA Left

Like many of you, my family relies on the health care insurance marketplace for our health insurance needs. The ACA has been a boon to me and my wife because we happen to have pre-existing conditions. Without the Affordable Care Act we would be uninsurable outside of a group plan. 
 Due to the recent election, the ACA is probably going to have some major changes in the next few years. Here's…

Archiving Websites with Wget

Let's say you want to archive a website. Maybe they're closing down or changing focus, or maybe you just want to view it offline.
You want to capture the whole site at a single point in time.
How would you do that? 
 You could just use your browser to save the page, but you probably won't get the HTML or images.
You could print the page to a PDF, but then it's in a weird format and…

Does an LLC protect me from a personal injury lawsuit?

Let's say you run a small photography business, taking pictures of babies for excited, proud parents.
You've heard that you should incorporate or form an LLC to limit your liability. 
 But what does that actually mean? 
 Not what you think it does. 
 
 What an LLC does 
 It turns out an LLC protects you, the owner, from your business's financial liabilities.
Going back…

One Thousand Days

Today in my calendar there's a little entry that just says "1000 days." 
 One thousand days ago I received my first infusion of life saving deadly poison. 
 Between that day and today, I received twenty infusions of poison and then the best news: I was cancer free. 
 I also lost a parent. Wrote a book. Got married to a beautiful, amazing, tolerant, hilarious woman. 
 I lost another…

New Book: Handle Your Business

Let's say you do some consulting work once in awhile.
You do some work, people pay you, everyone's happy. 
 Now, let's say you want to make a living with consulting, like I did a year ago .
What do you need to know?
How do you set up an effective, legitimate business around your work? 
 
 I did over two years of research into how to set up my business properly, both to…

Organizing Your Consulting Business


 This is an excerpt from my upcoming book Handle Your Business - the Succinct Guide to Money and Finance for the Self-Employed .
 Enter your email at the bottom for updates, early access, and a coupon when the book launches.
 
 A business is a legal fiction.
It only exists in so far as we and the courts believe it to.
It's an entity made of pure thought, even more so than…

Program Your Finances: Algorithmic Savings

When I started my first full time job in 2007 I started putting away a little bit of my paycheck every two weeks into savings. For the past two years I haven't been doing that manually. Instead, I've been using Ledger's fantastic automated transactions to put money away without having to think about it, both for long term goals and envelope budgeting . 
 
 Automated saving transactions…

Pay Your Taxes!

"I'm in deep with the IRS." 
 "We ended up owing $15,000 this year." 
 "I don't have that kind of money just laying around. How do I file an extension?" 
 Sound familiar? Maybe you're a freelancer. A consultant. An independent business person. Somehow, some way, you've got money coming in that isn't from a normal everyday W2 job. 
 One thing's for sure: you have to pay taxes on…

Program Your Finances: Envelope Budgeting

Note: you can find much more information about ledger on ledger-cli.org , including links to official documentation and other implementations. Also, check out my intro to accounting with Ledger . 
 A few years ago I heard about YNAB, or You Need A Budget . YNAB is a set of rules and associated software that help people to dig themselves out of financial holes and prosper with a budget. The…

DKIM Deep Dive

DKIM (DomainKeys Identified Mail) is another type of email deliverability record that helps recipient servers be confident that you authorized any given email. DKIM uses public-key-cryptography to mathematically sign important parts of your messages. This post is a deep dive into how it works and what it's good for. 
 
 Why do we need DKIM? 
 Like SPF, DKIM protects your domain against…

SPF: Sunscreen for your Email

Sender Policy Framework (SPF) is a type of email deliverability record that helps servers that receive email verify that the sender is allowed to send. It's been around for a few years and has been taken up by every large email provider. This post is a deep dive into how it works and what it's good for. 
 
 Why do we need SPF? 
 The protocol that we use to send email from server to…

Email: The Good Parts

Everybody knows what email is. You click "Compose", fill in the recipient's email address, write your message, maybe give it a pithy subject, and hit "Send". Some time later your recipient opens their email and reads your message. Simple, right? 
 There are an awful lot of interesting things happening between "Send" and "Some time later". This post is an overview of what happens when you hit…

Your DNS Provider Should Not Be Your Registrar

Note: This article references events that happened in December 2014. 
 Hopefully, by time you're reading this DNSimple will have recovered from their DDoS-powered outage . Today has probably been a terrible day for everybody over there and I'm sure they're ready for a break. While you can't do much to directly defend against DDoS attacks, you can insure yourself against DNS outages . 
 If…

What is the best modern payment provider?

Your business has to get paid , but how that happens is a complicated question, and the modern payment landscape is vast. How do you pick? 
 What payment service is the best fit for your business? 
 This list highlights the biggest modern payment providers in the market, where "modern" includes features like integrated merchant account and gateway services, RESTful APIs, and well…

Stripe removed SSLv3 support. Here's how to fix the HTTP 401 errors.

On November 15th Stripe deprecated SSLv3 because of the POODLE vulnerability. On the whole, this has been a good and welcome change, because SSLv3 has been terrible for a very long time. 
 The problem is that on some systems this causes backend API requests to start failing with an error message from Stripe because they're unable to auto-negotiate TLSv1.2. 
 
 Here are three ways to…

Payola v1.2: Now with Subscriptions

Today is release day for Payola v1.2.0 and the big watch word is subscriptions . So now that they're here, how do you use subscriptions with Payola? It's easy: 
 
 Install the gem 
 Configure a model 
 Set up a form 
 Profit! 
 
 
 Let's go through these in a bit more detail. 
 1. Installation 
 Add payola-payments to your Gemfile : 
 gem…