This file contains hidden or 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
function preventPopup(timeout) { | |
clearTimeout(timeout); | |
timeout = null; | |
window.removeEventListener("pagehide", preventPopup); | |
} | |
function openFacebook(site, platform) { | |
let fbAppUrl; | |
switch (platform.type) { | |
case "ios": |
This file contains hidden or 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
2018/05/24 21:39:41 [INFO] Terraform version: 0.11.7 | |
2018/05/24 21:39:41 [INFO] Go runtime version: go1.10.1 | |
2018/05/24 21:39:41 [INFO] CLI args: []string{"/usr/local/Cellar/terraform/0.11.7/bin/terraform", "apply", "-no-color"} | |
2018/05/24 21:39:41 [DEBUG] Attempting to open CLI config file: /Users/adam/.terraformrc | |
2018/05/24 21:39:41 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
2018/05/24 21:39:41 [INFO] CLI command args: []string{"apply", "-no-color"} | |
2018/05/24 21:39:41 [INFO] command: empty terraform config, returning nil | |
2018/05/24 21:39:41 [DEBUG] command: no data state file found for backend config | |
2018/05/24 21:39:41 [DEBUG] New state was assigned lineage "f92380d6-2738-92fd-0a93-a2c06df30704" | |
2018/05/24 21:39:41 [INFO] command: backend initialized: <nil> |
This file contains hidden or 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
public void metricPendingActivities() { | |
AWSStepFunctions client = AWSStepFunctionsClientBuilder.defaultClient(); | |
ListStateMachinesRequest lsmr = new ListStateMachinesRequest(); | |
//TODO: paging | |
ListStateMachinesResult machinesResult = client.listStateMachines(lsmr); | |
Map<String, Long> counts = machinesResult.getStateMachines() | |
.stream() | |
.map(m -> { |
This file contains hidden or 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
#Usage: PS1='[$(__active_machine "{%s} ")\u@\h $] | |
EMOJI=🐳 | |
__active_machine() { | |
FORMAT=$1 | |
if ACTIVE=$(docker-machine active 2>/dev/null); then | |
STATE=$(docker-machine status $ACTIVE) | |
if [ "$STATE" = "Running" ]; then | |
unset STATE | |
IP=$(docker-machine ip $ACTIVE) | |
fi |
This file contains hidden or 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
#!/bin/bash | |
# start boot2docker and shellinit automatically | |
DOCKER_RUN=`which docker` | |
docker(){ | |
if ! /Applications/VirtualBox.app/Contents/MacOS/VBoxManage list runningvms | grep boot2docker-vm >/dev/null ; then | |
boot2docker start | |
fi | |
if [ "$DOCKER_HOST" == "" ]; then | |
$(boot2docker shellinit) |