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
#!/bin/bash | |
grep -v '^$\|^\s*\#' $1 |
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
#!/bin/bash | |
if [ $# -eq 0 ]; then | |
echo "Usage: $0 <CERT_NAME>" | |
echo "e.g. $0 example.com" | |
else | |
openssl genrsa -des3 -passout pass:x -out $1.pass.key 2048 | |
openssl rsa -passin pass:x -in $1.pass.key -out $1.key | |
rm $1.pass.key | |
openssl req -new -key $1.key -out $1.csr | |
openssl x509 -req -days 365 -in $1.csr -signkey $1.key -out $1.crt |
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
version: 0.1 | |
log: | |
fields: | |
service: registry | |
http: | |
addr: :5000 | |
headers: | |
X-Content-Type-Options: [nosniff] | |
storage: | |
cache: |
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
DATE = $(shell date) | |
release: | |
@echo "Enter commit message:" | |
@read REPLY; \ | |
echo "${DATE} - $$REPLY" >> CHANGELOG; \ | |
git add --all; \ | |
git commit -m "$$REPLY"; \ | |
git push |
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
#!/bin/bash -x | |
# The bucket containing the userdata.d | |
export USERDATAD_BUCKET=userdata.example.com | |
# Required to set the endpoint of the aws-cli | |
export AWS_DEFAULT_REGION=eu-west-1 | |
# Install Prerequisites | |
yum install -y aws-cli | |
# Download all .sh scripts from the bucket and pipe to bash | |
SCRIPTS=$(aws s3 ls s3://$USERDATAD_BUCKET/userdata.d/ | awk '{ print $4 }') | |
for S in $SCRIPTS; do |
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
#!/bin/bash | |
sudo yum install -y gcc libxml2 libxml2-devel libxslt libxslt-devel |
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
#!/bin/bash | |
DNS_DOMAIN=${DNS_DOMAIN:-example.com} | |
HOST=${HOST:-www} | |
HOSTNAME=$HOST.$DNS_DOMAIN | |
PROTOCOL=${PROTOCOL:-https} | |
URL=$PROTOCOL://$HOSTNAME | |
echo " --> Testing for $URL" | |
# Number of requests | |
TIMEOUT=30 | |
# Time to wait between requests |
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
#!/bin/bash | |
# Abort with exit and message | |
# Used for testing | |
function abort() | |
{ | |
echo " *** ERROR $@" | |
exit 1 | |
} |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: dockercompose | |
# Required-Start: $docker | |
# Required-Stop: $docker | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Docker Services | |
### END INIT INFO |
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
DATE = $(shell date) | |
NAME = dcrbsltd/image | |
VERSION = 1 | |
all: build | |
build: | |
docker build -t $(NAME):$(VERSION) --rm . | |
tag_latest: |