Skip to content

Instantly share code, notes, and snippets.

Erik Weathers erikdw

  • segmentio
  • Oakland, CA
Block or report user

Report or block erikdw

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
erikdw /
Created May 6, 2019 — forked from nitrocode/
Attempt to create a route on an ALB to be redirected to a Lambda WIP
# input vars
variable "environment" {
default = "Dev"
# local vars
locals {
name = "hello"
env = "${lower(var.environment)}"
lb_name = "${join("-", list("TF", var.environment,}"
View tips-and-tricks.txt
Raw version of without ugly formatting.
1. SSH break-out:
2. Shadowed window screenshot in mac:
(13) tcpdumps:  (no -s 65535 needed on recent tcpdumps)

  (a) find dns requests (adjusted for being on hosts in terremark):
     sudo tcpdump -i eth1 -c3000 -l -n dst port 53 | grep api

     sudo tcpdump -i eth0 -c3000 -l -n port 3133

  (b) capture all data:
erikdw /
Last active Oct 3, 2018
Creation of Groupon Farewell Word-Cloud as G logo.

Download all "company-departure" emails with got-your-back:

./gyb --email --search 'label:company-departures'

Join all .eml file bodies into a single file

Build this program based on a stackoverflow answer:

View storm-shade-storm-core-utils.xml
erikdw / github_load_all_diffs.js
Last active Mar 14, 2018 — forked from juanca/github_load_all_diffs.js
Github PR bookmarklet: Load all file diffs
View github_load_all_diffs.js
document.querySelectorAll('.load-diff-button').forEach(node =>;
document.querySelectorAll('.js-details-target').forEach(node =>;
// Both of those buttons should have the '.btn-link' class too, but I wasn't able to quickly figure out how to
// add an AND condition to that. Tried the below, didn't work:
//document.querySelectorAll('[.btn-link][.load-diff-button]').forEach(node =>;
erikdw /
Created Feb 5, 2018
setjdk shell function. This is what I've used in zsh, should work in bash too.
# Example usage: setjdk 1.8
function setjdk {
local ver=${1?Usage: setjdk <version>}
export JAVA_HOME=$(/usr/libexec/java_home -v $ver)
PATH=$(echo $PATH | tr ':' '\n' | grep -v Java | tr '\n' ':')
export PATH=$JAVA_HOME/bin:$PATH
diff --git storm-core/src/jvm/org/apache/storm/daemon/supervisor/ storm-core/src/jvm/org/apache/storm/daemon/supervisor/
index 0fa60f129..dd4e8db78 100644
--- storm-core/src/jvm/org/apache/storm/daemon/supervisor/
+++ storm-core/src/jvm/org/apache/storm/daemon/supervisor/
@@ -145,6 +145,7 @@ public class ReadClusterState implements Runnable, AutoCloseable {
HashSet<Integer> allPorts = new HashSet<>(assignedPorts);
+ iSuper.assigned(allPorts);
diff --git storm/src/main/storm/mesos/ storm/src/main/storm/mesos/
index 4d3b05b..2cbb777 100644
--- storm/src/main/storm/mesos/
+++ storm/src/main/storm/mesos/
@@ -41,9 +41,13 @@ import storm.mesos.util.MesosCommon;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashSet;
import java.util.List;
erikdw / 0. Build
Last active Sep 14, 2017
Issue with task not launching
View 0. Build
# git clone
# cd mesos
# mkdir build
# ... blah blah ...
# build it
# cd build
You can’t perform that action at this time.