Skip to content

Instantly share code, notes, and snippets.

Will McCutchen mccutchen

  • Los Angeles, y'all
Block or report user

Report or block mccutchen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View nsq_to_file_jepsen.go
package main
// Here's a half-assed "jepsen" test for nsq_to_file that exercises its
// management of files in -work-dir and -output-dir in the face of multiple
// processes sharing those directories.
//
// Usage:
//
// 1. Ensure that the versions of nsqd & nsq_to_file you intend to test are on
// your $PATH:
View git-cleanup
#!/usr/bin/env python
import subprocess
import sys
def get_current_branch():
cmd = 'git name-rev --name-only HEAD'.split()
return subprocess.check_output(cmd).strip()
@mccutchen
mccutchen / fillcache.md
Last active Jun 17, 2018
fillcache: a poor man's in-process groupcache
View fillcache.md
View datadog-fix.diff
commit 3ebbd2f39d4a3b356d3b5c005caef368eaca4529
Author: Will McCutchen <will@mccutch.org>
Date: Sat Mar 3 14:08:05 2018 -0800
ansible: upgrade to datadog agent 6
diff --git a/ansible/group_vars/all b/ansible/group_vars/all
index dce89d4..c5dd911 100644
--- a/ansible/group_vars/all
+++ b/ansible/group_vars/all
@mccutchen
mccutchen / Dockerfile
Created May 16, 2017
example volume_tester rig service
View Dockerfile
FROM python:2.7.11-slim
RUN pip install datadog==0.16.0
COPY . /app
CMD ["/app/volume_tester.py"]
View copy-creds-to-vm
#!/bin/bash
echo "copying ~/.aws/config onto rig.dev vm ..."
scp ~/.aws/config rig.dev:~/.aws/config
echo
echo "adding ~/.aws/credentials to existing credentials on rig.dev vm ..."
cat ~/.aws/credentials | ssh rig.dev sh -c 'cat >> ~/.aws/credentials'
View git-cleanup
#!/usr/bin/env python
import subprocess
import sys
def get_current_branch():
cmd = 'git name-rev --name-only HEAD'.split()
return subprocess.check_output(cmd).strip()
View data_scientist_interview.md

Some engineering-related interview questions to ask a data scientist candidate.

  • How comfortable are you at a Linux or OS X command line?
    • Can you navigate around?
    • What are pipes?
  • Do you use source control?
    • How comfortable are you with git in particular?
    • Are you familiar with pull requests and code review?
    • Do you know to avoid common mistakes like checking large input or result data sets into the source code repo?
  • How do you ensure that your results are repeatable? How do you make sure other people can run your code reliably and easily?
View update-terraform-refs.py
#!/usr/bin/env python
"""
Once you've used `terraforming` to generate both HCL resource defintions and a
`terraform.tfstate` file to import your existing AWS resources into terraform,
your new resources will be littered with references to specific AWS resource
IDs rather than symbolic references to terraform-level resources.
This script will attempt to rewrite those IDs with symbolic references, so that
terrafrom can properly manage the resources and build a dependency graph
View logentries_debugging.md

heheheh

y'all are gonna love this

I figured out why logentries keeps sending log files

it's a doozy

so I straced multilog for /service/auth_api-1/log/current

You can’t perform that action at this time.