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
#Inspect all containers | |
> docker ps -aq|xargs -J$ docker inspect $| jq . | |
#List Mount points for all containers | |
> docker ps -aq|xargs -J$ docker inspect -f "{{json .Mounts}}" $| jq . | |
#On OSX all mounted volumes are actually mounted on the hiddel Linux VM that Docker-For-Mac is running behind the scenes | |
# - To get to Linux virtual machine (actual machine running Docker process on OSX) | |
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty |
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
class ThorHelpCatcher | |
def self.start(thor_clazz, args) | |
help_flag = (args & %w[--help -h])[0] | |
return thor_clazz.new.help(args.index(help_flag) == 0 ? args[1] : args[0]) if help_flag | |
thor_clazz.start(args) | |
end | |
end |
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
require 'open3' | |
require 'logger' | |
class CommandRunner | |
class CommandFailedError < StandardError | |
def initialize(command, status) | |
super("Exit status (#{status}) is non-zero for command: #{command}") | |
end | |
end | |
EXIT_STATUS_INTERRUPT = 130 |
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
<templateSet group="JavaScript"> | |
<template name="clogv" value="console.log("-----> $VAR_STRING$: ", $VAR$);$END$" description="debug log a variable" toReformat="true" toShortenFQNames="true"> | |
<variable name="VAR" expression="jsSuggestVariableName()" defaultValue="" alwaysStopAt="true" /> | |
<variable name="VAR_STRING" expression="escapeString(VAR)" defaultValue="" alwaysStopAt="false" /> | |
<context> | |
<option name="JS_STATEMENT" value="true" /> | |
</context> | |
</template> | |
</templateSet> |
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
fly -t production i -b [build number] -t task "tar" "-cO" "/tmp/build/" | tail -n +2 > [path/to/tar.tar] |
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
ssh-keygen -t rsa -b 4096 -C "comment" -f id_rsa.custom-filename -N '' |
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
#!/usr/bin/env ruby | |
require 'yaml' | |
require 'optparse' | |
options = { | |
target: 'local' | |
} | |
optparse = OptionParser.new do |opt| |
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
#!/usr/bin/env bash | |
HOURS=$1 | |
if [ -z $HOURS ]; then | |
echo "Usage: $0 <num hours>" | |
exit 1 | |
fi | |
ssh-add -D |
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
ruby -e 'puts "\e[32m#{`cat -n spec/controllers/doubles_matches_controller_spec.rb`}\e[0m "' |