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
import os | |
import re | |
import time | |
import pickle | |
import subprocess | |
from collections import defaultdict | |
def run_command(command, error_msg=None, show_output=True): | |
try: |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
{{ $CurrentContainer := where $ "ID" .Docker.CurrentContainerID | first }} | |
{{ define "upstream" }} | |
{{ if .Address }} | |
{{/* If we got the containers from swarm and this container's port is published to host, use host IP:PORT */}} | |
{{ if and .Container.Node.ID .Address.HostPort }} | |
# {{ .Container.Node.Name }}/{{ .Container.Name }} | |
server {{ .Container.Node.Address.IP }}:{{ .Address.HostPort }}; | |
{{/* If there is no swarm node or the port is not published on host, use container's IP:PORT */}} | |
{{ else if .Network }} |
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
[alias] | |
commit-including-submodule = "!f() { \ | |
if [ -u $1 ]; then \ | |
git submodule foreach \"git add --all && git commit -m 'update - `date '+%Y-%m-%d %T'`' || :\"; \ | |
git add --all && git commit -m \"update - `date '+%Y-%m-%d %T'`\"; \ | |
echo \"success\"; \ | |
else \ | |
git submodule foreach 'git add --all && git commit -m \"$1\" || :'; \ | |
git add --all && git commit -m $1; \ | |
echo \"success\"; \ |