Skip to content

Instantly share code, notes, and snippets.


Andrew Starr-Bochicchio andrewsomething

View GitHub Profile
andrewsomething /
Last active Dec 12, 2018
Terraform + DigitalOcean Kubernetes = <3
provider "digitalocean" {}
// Create a cluster on DigitalOcean
resource "digitalocean_kubernetes_cluster" "example" {
name = "example"
region = "nyc1"
version = "1.12.3-do.1"
node_pool {
name = "wokers"
View tf.diff
diff --git a/digitalocean/config.go b/digitalocean/config.go
index 96f6785..bc38c31 100644
--- a/digitalocean/config.go
+++ b/digitalocean/config.go
@@ -12,33 +12,63 @@ import (
+ ""
andrewsomething / main.go
Last active Mar 15, 2019
Report download statistics for GitHub release assets
View main.go
package main
import (
andrewsomething /
Last active Dec 21, 2018
Backup GitLab to DigitalOcean Spaces

Backup GitLab to DigitalOcean Spaces

GitLab uses Fog to communicate with various object storage services when running backups. Fog works with S3 as well as S3-compatible services like Spaces. The key difference is that you need to explictly set the endpoint for non-S3 services. If you are using the "ominbus" GitLab packages, you would need to add the following to /etc/gitlab/gitlab.rb:

gitlab_rails['backup_upload_connection'] = {
andrewsomething /
Last active Sep 8, 2020
This script will add the "hacktoberfest" label to any issue that also has one of the following labels applied: 'help wanted', 'first-timers-only', 'up-for-grabs'
#!/usr/bin/env python3
import os
import sys
import requests
import json
LABELS = ['help wanted', 'help-wanted', 'first-timers-only', 'up-for-grabs',
'good first issue']
andrewsomething / get_snapshots.go
Created Nov 18, 2016
List DigitalOcean snapshots using godo
View get_snapshots.go
package main
import "os"
import "fmt"
import ""
import ""
type TokenSource struct {
AccessToken string
andrewsomething / handlers.yml
Last active Sep 15, 2020
My "first five minutes" on a server
View handlers.yml
- name: Restart sshd
name: ssh
state: restarted
become: yes

Keybase proof

I hereby claim:

  • I am andrewsomething on github.
  • I am andrewsomething ( on keybase.
  • I have a public key ASCO7zx323E54gqLUqfeLsormSWMqkLVgEf-g31lM8-OXAo

To claim this, I am signing this object:

andrewsomething /
Created Jul 12, 2016
Bash completion file generated for doctl 1.3.0
# bash completion for doctl -*- shell-script -*-
if [[ -n ${BASH_COMP_DEBUG_FILE} ]]; then
echo "$*" >> "${BASH_COMP_DEBUG_FILE}"
# Homebrew on Macs have version 1.3 of bash-completion which doesn't include
View gist:3b3a237d9b2d1d64f234ddab6b5f7e7e
root@horizon-rethinkdb-on-1404:~/app# hz serve --bind all --dev --debug
App available at
debug: RethinkDB stdout: Recursively removing directory /root/app/rethinkdb_data/tmp
debug: RethinkDB stdout: Initializing directory /root/app/rethinkdb_data
info: RethinkDB Running rethinkdb 2.3.2~0trusty (GCC 4.8.2)...
info: RethinkDB Running on Linux 3.13.0-86-generic x86_64
debug: RethinkDB stdout: Loading data from directory /root/app/rethinkdb_data
error: rethinkdb stderr: warn: Cache size does not leave much memory for server and query overhead (available memory: 845 MB).
info: RethinkDB Listening for intracluster connections on port 40518
info: RethinkDB Listening for client driver connections on port 35129