# git clone github.com:mesos/mesos
# cd mesos
# mkdir build
# ... blah blah ...
# build it
# cd build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git storm/src/main/storm/mesos/MesosSupervisor.java storm/src/main/storm/mesos/MesosSupervisor.java | |
index 4d3b05b..2cbb777 100644 | |
--- storm/src/main/storm/mesos/MesosSupervisor.java | |
+++ storm/src/main/storm/mesos/MesosSupervisor.java | |
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git storm-core/src/jvm/org/apache/storm/daemon/supervisor/ReadClusterState.java storm-core/src/jvm/org/apache/storm/daemon/supervisor/ReadClusterState.java | |
index 0fa60f129..dd4e8db78 100644 | |
--- storm-core/src/jvm/org/apache/storm/daemon/supervisor/ReadClusterState.java | |
+++ storm-core/src/jvm/org/apache/storm/daemon/supervisor/ReadClusterState.java | |
@@ -145,6 +145,7 @@ public class ReadClusterState implements Runnable, AutoCloseable { | |
} | |
} | |
HashSet<Integer> allPorts = new HashSet<>(assignedPorts); | |
+ iSuper.assigned(allPorts); | |
allPorts.addAll(slots.keySet()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: | |
document.querySelectorAll('.load-diff-button').forEach(node => node.click()); | |
document.querySelectorAll('.js-details-target').forEach(node => node.click()); | |
// 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 => node.click()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project> | |
... | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-shade-plugin</artifactId> | |
<executions> | |
<execution> | |
<phase>package</phase> |
Download all "company-departure" emails with got-your-back:
./gyb --email MYGMAILACCOUNT@gmail.com --search 'label:company-departures'
Build this program based on a stackoverflow answer:
(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
(thepoint@tm22-s00311)
sudo tcpdump -i eth0 -c3000 -l -n port 3133
(b) capture all data:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Raw version of https://github.com/erikdw/tips-and-tricks/wiki/Tips-and-Tricks without ugly formatting. | |
1. SSH break-out: | |
``` | |
<enter>~. | |
<enter>~? | |
``` | |
2. Shadowed window screenshot in mac: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# input vars | |
variable "environment" { | |
default = "Dev" | |
} | |
# local vars | |
locals { | |
name = "hello" | |
env = "${lower(var.environment)}" | |
lb_name = "${join("-", list("TF", var.environment, local.name))}" |