David Newgas
-
Typed config: A refactor story
Back in my days with Google Cloud Support, we wrote and maintained a case automation system. It would regularly inspect all our support cases and apply rules against them that checked for certain conditions and then executed certain actions. Our config was a text protobuf specifying each of the rules something like: On initialization the…
-
Double-negative auth: a vulnerability story
In university I ran a Drupal website for an undergraduate student body. The university had a single-sign-on system called “Raven”, and happily someone had already had written a Drupal 5 module to allow using Raven authentication, called “ucamraven“. When Drupal 6 came out, I dutifully wrote a Drupal 6 version of ucamraven but got stuck…
-
Project Debrief: UV Index on Home Assistant
Project Goals I use Home Assistant for home automation, with a handy dashboard visible in my living room. On sunny days, I would like to know whether I need sunscreen so a UV index display is ideal. Home Assistant does already have a UV Index integration but is has two issues: Design The first step…
-
Project Debrief: ELO Foosball
Project Goals The staff at the startup I was in around 2013 conformed to stereotype by playing a lot of Foosball, and quite competitively at that. To revel in this, I decided to write an app that would a) allow us to track games and b) provide a ranking of players! Design For tracking games,…
-
Skip Flask, even for tiny projects
Flask is a lightweight Python web application framework. It makes clever choices to be simple but powerful, such as using existing libraries like SQLAlchemy and Jinja, and keeping boilerplate down to nothing. This makes it very compelling when you want to create “just a few functions” sized applications. But I’d strongly recommend skipping Flask. If…
-
Howto: run a single application behind a VPN on linux
VPNs have lots of benefits like privacy and geo-diverse egress, but also can have worse latency, throughput and be blocked by some sites. So it’s natural that you might want a VPN for some of your internet usage, but not all. I found I wanted to run one application behind a VPN but not others,…
-
Project Debrief: Filter Feed
Note: this post is probably of low interest. I am simply making a record of some little personal projects I have made. Project Goals I subscribe to several podcasts and RSS feeds which include some posts I’m not interested in. For example, USGS has a feed of volcano statuses but I only want to subscribe…
-
Project Debrief: Dice Calculator
Note: this post is probably of low interest. I am simply making a record of some little personal projects I have made. Project Goals My personal motivation for this project was to learn about voice assistants. The actual project goal, however, was to produce a dice calculation voice assistant feature that understood the ins-and-outs of…
-
My Google Epitaph
This post originally appeared as a Google-internal “Epitaph” – a leaving note for a parting employees. Larry and Sergey’s 2004 letter to investors said “Google is not a conventional company. We do not intend to become one.” However, laying off 12,000 workers, despite having a $114B war chest, $60B in 2022 profit and growing revenue[1],…
-
Stackdriver HTTPS uptime check, with certificate verification
Stackdriver offers Uptime Checks for HTTPS. Sadly these checks don’t verify the certificate, so you won’t get an alert if a certificate expires. A simple solution is to add a Google Cloud Function in between Stackdriver and your site. This allows the usual Stackdriver monitoring and alerting, plus a check in Google Cloud Function that…