Robert Hafner's Projects

Selected Writings and Open Source Projects

Writings

Terraform in Depth

Terraform in Depth

An in-depth guide to everything Terraform and OpenTofu. Covers Infrastructure as Code from the basics to advanced production uses, including modules, CI/CD, testing, and custom providers.

Beyond the Vibes

Beyond the Vibes

A rigorous guide to AI coding assistants and agents. Covers tools, practices, and guardrails for using AI in development without falling into the traps of vibe coding.

Project Templates

tedivms-flask

Star

This is my default Flask project template. It contains a complete docker environment, user management system, API system, Celery worker and tasks, and other important modules in addition to a Bootstrap based front end.

Favorites

Stash

Star

This caching library supports multiple backends with a consistent frontend. It supports hierarchical keys, stampede and dogpile protection, automatic miss distribution, and more.

JShrink

Star

This library minifies javascript using 100% pure PHP, allowing it to be integrated into applications with minimal work and maximum compatibility.

Applications

Nebula

Nebula

Star

Nebula provides a simplified dashboard that allows researchers to launch and manage their own servers on AWS. It also provides SSH Key management, scheduled shutdowns, group controls, and a variety of other features.

League of Automated Nations

League of Automated Nations

Star

This web application is an alliance tracker for a programming game called Screeps. It maintains rankings as well as an interactive map showing which rooms are claimed by different players and alliances.

ec2details

Star

This service provides an API with metadata (including pricing) for every AWS EC2 instance type. It processes the AWS Bulk API to multiple times a day to always provide the most up to date information.

Multi-Py

Multi-Py is a collection of python images with amd64, arm64, and arm v7 support.

Python Development

These tools were specifically designed to make development with Python easier.

Libraries

SkySnoop

Star

A Python SDK and CLI for querying aircraft data from adsb.lol, a community-driven ADS-B aggregation service.

Digital Art

Rob's Wall Clock

Star

A hardware project building an internet enabled clock with a colorful variant of Conway's Game of Life as a background.

CLIs

URLParser

Star

Another really simple tool, the URLParser takes in various URIs and returns back the piece you're looking for; such as the scheme, domain, or port.

DapperData

Star

An opinionated file formatter for JSON and YAML that can be used to fix formatting or integrated into the test suite to ensure files are formatted appropriately.

Terraform

Puppet

Puppet

rsnapshot

Star

This advanced rsnapshot module makes backing up servers trivial. SSH keys and accounts are created, as are wrapper scripts around sudo to prevent opening the root account to ssh.

Puppet

ghebackups

Star

This module turns a server into a Github Enterprise backup server. It creates the relevant accounts, adds cronjobs, and manages ssh options to ensure that backups occur.

Puppet

hieratic

Star

This module makes all of the native datatypes present in Puppet accessible directly using Hiera in order to make testing and prototyping faster.

Puppet

iscsi

Star

This module makes it possible to define iscsi connections in Puppet. This makes it easier to work with AWS Storage Gateways and other iscsi devices.

Misc

HeadedHome

Star

Using an IOT Button as a trigger, this Lambda function estimates my time of getting home from work based off of current public transit times and sends a text to both myself and my partner with that ETA.

Screeps

Screeps is an an open-source sandbox MMO RTS game for programmers, wherein the core mechanic is programming your units' AI.

Quorum

Quorum

Star

The Quorum project is an experiment that uses Screeps, GitConsensus, and the ScreepsAutoSpawner to see what happens when the community has to vote to accept new pull requests- and any vote that passes gets pulled. It initially started as being written primarily by me and overtime has gotten more community involvement.

ScreepsAutoSpawner

ScreepsAutoSpawner

Star

This program checks the Screeps world to see if the player is still alive, and if not it automatically respawns them into the world. This requires scanning the world to find appropriate locations, scoring them, and then placing the first spawn automatically in the selected room.

ScreepsDashboard

ScreepsDashboard

Star

This dashboard was created for the Quorum project and lets the public view all of the otherwise hidden Screeps player information. This application exposed wallet, memory, segment, and console data (which gets stored in ElasticSearch to allow querying of historic data).

python-screeps

Star

This library was the first third party library for the Screeps API and has been responsible for spawning a large third party ecosystem.

screeps_notify

screeps_notify

Star

This bridges the Screeps world with the real world by allowing users to send notifications programmatically from in game to a number of providers, including Text Messages and Slack Notifications.

screeps-stats

screeps-stats

Star

Using a reverse engineered API this project takes data saved inside the game “Screeps”, transforms it and injects it into elasticsearch.

Spawn1

Spawn1

Star

This is a mobile client for the Screeps game built using NativeScript. It has a built in messenger, profiles of different alliances, a websocket based console for interacting with the system, and other informational pages such as the wallet and market order pages.

screepsmod-konami

screepsmod-konami

Star

Konami is a Screeps Server mod that changes the world settings to allow AI to grow significantly faster. This makes development easier as longer term issues will show up in smaller amounts of time.

screeps-backup

screeps-backup

Star

This tool takes a backup of an existing account's memory and segments and provides the ability to restore from those backups.