Skip to content

Instantly share code, notes, and snippets.


Matt Butcher technosophos

View GitHub Profile
technosophos /
Last active Dec 12, 2019
Installing a VS Code-based development environment for FTC on Linux

Installing a Development Environment for FTC on Linux with VS Code

This documents my attempts to get the First Tech Challenge (FTC) base code running on Linux using VS Code instead of Android Studio. Android Studio is a little too slow and hefty for my liking.


I am running Ubuntu 18.04. Package names and installation methods will vary on other platforms.

Install JDK

technosophos / Dockerfile
Created Sep 27, 2019
Rust Dockerfile hacks for faster builds
View Dockerfile
FROM rust:1.37 AS builder
WORKDIR /usr/src/buck
COPY Cargo.toml .
COPY Cargo.lock .
# Layer hack: Build an empty program to compile dependencies and place on their own layer.
# This cuts down build time
RUN mkdir -p ./src/ && \
echo 'fn main() {}' > ./src/ && \
technosophos / firefox-open-tab.applescript
Last active Dec 21, 2019
Open a Tab in Firefox on macOS with AppleScript
View firefox-open-tab.applescript
# To run:
# osascript firefox-open-tab.applescript
# References:
on firefoxRunning()
tell application "System Events" to (name of processes) contains "firefox"
end firefoxRunning
technosophos /
Created Dec 19, 2017
Simple Kubernetes Brigade event generator.
#!/usr/bin/env bash
set -euo pipefail
# The Kubernetes namespace in which Brigade is running.
# This is
technosophos / ulid.go
Created Nov 16, 2017
Generate a ULID on the commandline
View ulid.go
package main
import (
technosophos /
Created Nov 10, 2017
Git post-receive hook that creates Brigade event
while read oldrev newrev refname
e_build_id=$(echo "$build_id" | base64 -w 0)
e_project_id=$(echo "$ACID_PROJECT_ID" | base64 -w 0)
e_acidjs=$(git show ${newrev}:acid.js | base64 -w 0)
technosophos /
Last active Dec 1, 2016
Helm User Interface Design Guidelines

Helm User Interface Guidelines


This document specifies how to write build a consistent and useable command line client (CLI) that follows the conventions already established in the Helm project.

The Goal Is Obvious

The goal of a good user interface is to make it obvious to the user. This is achieved in three ways:

technosophos /
Created Nov 29, 2016
Query a cluster to populate a Helm chart
tpl="{{range .items}}{{}} {{end}}"
if [[ "" == $1 ]]; then
echo name of app is required
exit 1
technosophos /
Created Dec 15, 2015
Setting up a Kube config file for vagrant
EXTRA_DOCKER_OPTS="--insecure-registry --insecure-registry"
# Flag to tell the kubelet to enable CFS quota support
# Optional: Install cluster DNS.
technosophos /
Last active Dec 8, 2015
Three Reasons Not to Check Vendor Into VCS

Losing the VCS

When you check vendored code into VCS, that code is no longer tracked in its own git repo (since you must remove the .git directory to check it in, or else treat it as a submodule). We thus lose all of the assistance the VCS was giving us. This leads to three problems:

  1. Updates require full checkouts every single time. Any time you need to update a dependency, you have to check out that dependency, along with all of those that it requires. Then you must do all the version management, only to remove most of what you checked out at the end. The unfortunate result is that for many teams, they never update vendored packages, and security and stability issues go unnoticed. For us, one of our core dependencies is Kubernetes. So updating that one dependency requires checking out around 200 additional packages. Thus, updating is a non-trivial (quite time-consuming) task.

  2. Working with dependent packages is harder. Say I have two packages: A and B. And A depends on B. Working on problems b

You can’t perform that action at this time.