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/sh | |
if [ "$1" = "config" ]; then | |
echo '{}' | |
fi | |
exit 0 |
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 | |
if (( $RANDOM % 2 )); then | |
>&2 echo 'Random failure' | |
exit 1 | |
fi | |
exit 0 |
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
git diff --name-status master..$(git symbolic-ref --short HEAD)|awk '{print $2}' |
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
diff --git a/Dockerfile.j2 b/Dockerfile.j2 | |
index 09f09f9..7ebbaad 100644 | |
--- a/Dockerfile.j2 | |
+++ b/Dockerfile.j2 | |
@@ -9,4 +9,6 @@ COPY . /srv/helloworld/code | |
RUN echo "{{ BUILD_REVISION }}" > version-info.txt | |
RUN rm -rf env | |
RUN pip install -U . | |
-CMD bin/confd -confdir etc/confd/ -log-level info -backend etcd -node http://etcd-client:2379 | |
+ENV HELLOWORLD_DB_HOST localhost |
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
# standard wsgi middleware | |
def some_wsgi_middleware(app): | |
def middleware(environ, start_response) | |
def custom_start_response(status, headers, exc_info): | |
# they get overwritten here from func args | |
custom_start_response._status = status | |
custom_start_response._headers = headers | |
custom_start_response._status = custom_start_response._headers = None | |
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
# standard wsgi middleware | |
def some_wsgi_middleware(app): | |
def middleware(environ, start_response) | |
def custom_start_response(status, headers, exc_info): | |
# they get overwritten here from func args | |
custom_start_response._status = status | |
custom_start_response._headers = headers | |
response = app(environ, custom_start_response) |
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
board = { | |
'A': [' ', ' ', ' '], | |
'B': [' ', ' ', ' '], | |
'C': [' ', ' ', ' '], | |
} | |
def print_board(): | |
for i in "ABC": | |
print(" | {} | {} | {} |".format(*board[i])) |
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
# filter_plugins/zip.py | |
class FilterModule(object): | |
def filters(self): | |
return {'zip': zip} |
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
from __future__ import unicode_literals | |
import os | |
import re | |
import requests | |
from imapclient import IMAPClient | |
fail_subject_re = re.compile('(Subject: )(Build failed in Jenkins: .+? )') |
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
plugins_repos: | |
- https://github.com/juju/plugins.git | |
- https://github.com/bloodearnest/plugins.git#juju-local-dns | |
- https://github.com/bloodearnest/plugins.git#juju-add-local-env |