Skip to content

Instantly share code, notes, and snippets.

@edevil
edevil / new_technology_proposal.md
Created February 19, 2019 16:54
Foursquare's New Technology Policy

Foursquare's New Technology Policy

Why?

Being able to introduce new technologies (programming languages, frameworks/platforms) is great, but there can be significant production and maintenance overhead to new systems:

  • If it's a replacement, we need to get it up to our current standards and reeducate everyone who uses the existing one

  • If it's an additional system we need to do everything for a replacement AND integrate all of our existing tooling/monitoring/etc so that we can give consistent guidelines for people on call or who are doing development

@edevil
edevil / Gopkg.toml
Created January 8, 2018 17:26
Dep strangeness
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
0xF7522868e935c6fcdA543e3baC78495dB884EE3b

Keybase proof

I hereby claim:

  • I am edevil on github.
  • I am edevil (https://keybase.io/edevil) on keybase.
  • I have a public key ASBbkeyvsJe97e13cEqm0O2ucO8FkKSc9av1LSTuxA1WUgo

To claim this, I am signing this object:

@edevil
edevil / start.sh
Created October 27, 2016 10:09 — forked from camshaft/start.sh
elixir startup script with graceful shutdown
#!/bin/bash
HOSTNAME="localhost"
PORT=${PORT-4000}
NODE="app_$PORT"
if [ -z "$COOKIE" ]
then
COOKIE=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
fi
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[Unit]
Description=Copy CIFS mount
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
TimeoutStartSec=0
ExecStart=/bin/sh -c "rm -fr /opt/sbin && rsync -a /usr/sbin/ /opt/sbin/ && /usr/bin/docker run -v /opt/sbin:/target so0k/mount.cifs_copy /target && mount --bind /opt/sbin/ /usr/sbin/"
@edevil
edevil / stress.yaml
Created July 1, 2016 08:17 — forked from sercand/stress.yaml
Kubernetes Stress Job
apiVersion: batch/v1
kind: Job
metadata:
name: pi-with-timeout
spec:
parallelism: 20
completions: 100
template:
metadata:
name: pi
@edevil
edevil / phoenix-app.service
Created February 12, 2016 12:49 — forked from kzkin/phoenix-app.service
systemd service for phoenix framework release (exrm)
# Phoenix Framework - A productive web framework that does not compromise speed and maintainability
[Unit]
Description=Phoenix Framework ISControl Application
After=network.target
[Service]
Type=simple
User=deployer
RemainAfterExit=yes
Mar 22 18:40:04 ubuntu docker[35378]: time="2016-03-22T18:40:04.296241605Z" level=error msg="Couldn't run auplink before unmount: exec: \"auplink\": executable file not found in $PATH"
Mar 22 18:40:04 ubuntu kernel: [ 4730.637950] aufs au_opts_verify:1597:docker[35720]: dirperm1 breaks the protection by the permission bits on the lower branch
Mar 22 18:40:04 ubuntu docker[35378]: time="2016-03-22T18:40:04.319228808Z" level=error msg="Couldn't run auplink before unmount: exec: \"auplink\": executable file not found in $PATH"
Mar 22 18:40:04 ubuntu kernel: [ 4730.661698] aufs au_opts_verify:1597:docker[35720]: dirperm1 breaks the protection by the permission bits on the lower branch
Mar 22 18:40:04 ubuntu kernel: [ 4730.692520] aufs au_opts_verify:1597:docker[35720]: dirperm1 breaks the protection by the permission bits on the lower branch
Mar 22 18:40:04 ubuntu docker[35378]: time="2016-03-22T18:40:04.795684844Z" level=error msg="Couldn't run auplink before unmount: exec: \"auplink\": executable file not found