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 | |
set -e | |
while [[ $# > 0 ]] | |
do | |
case "$1" in | |
--folder) | |
shift | |
FOLDER="$1" |
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 | |
echo "clean containers ..." | |
docker ps --filter status=exited -aq | xargs --no-run-if-empty docker rm -vf | |
echo "clean images ..." | |
docker images --quiet --filter=dangling=true | xargs --no-run-if-empty docker rmi -f | |
docker images | grep old | awk '{ print $1 " " $2 }' | while read LINE | |
do | |
IMAGE=$(echo $LINE | cut -d' ' -f1) |
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 | |
# for coreos with flannel ... | |
# Example use ./iptables.sh --source 172.16.23.0/24 --destination 172.16.23.1 --local 10.2.0.2 --dry-run true | |
while [[ $# > 1 ]] | |
do | |
ARGS="$1" | |
case $ARGS in | |
-s|--source) |
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/ksh | |
LOG="/tmp/access_pot.log" | |
BLACKLIST="/root/config/pf/persistent-block.list" | |
set -A RFCS 10 172 192 | |
while true; do | |
if [[ -a $LOG ]]; then | |
tail -f $LOG | while read LINE; do |
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
# Radicale Dockerfile | |
# | |
# VERSION 0.3 | |
FROM alpine:latest | |
# Base packages | |
RUN apk update && apk upgrade | |
RUN apk add ca-certificates git python python-dev py-setuptools py-pip build-base libffi-dev |
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
# Radicale Dockerfile | |
# | |
# VERSION 0.3 | |
FROM alpine:latest | |
# Base packages | |
RUN apk update && apk upgrade | |
RUN apk add ca-certificates python nginx py-setuptools apache2-utils |
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
# Generate SSL | |
openssl req -newkey rsa:2048 -nodes -keyout domain.key -x509 -days 365 -out domain.crt | |
# Generate DH | |
openssl dhparam -out dhparam.pem 4096 | |
ssl_certificate /etc/nginx/ssl/domain.crt; | |
ssl_certificate_key /etc/nginx/ssl/domain.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; | |
ssl_prefer_server_ciphers on; |
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 | |
# Usage: ./mkimage.sh jessie | |
MIRROR="http://archive.raspbian.org/raspbian" | |
RELEASE="$1" | |
TAG="debian:$RELEASE" | |
DIR=$(mktemp -d) | |
debootstrap --variant=minbase $RELEASE $DIR $MIRROR | |
tar --numeric-owner -C $DIR -c . | docker import - $TAG |
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 | |
# first A record, second authoritive DNS | |
RECORDS=(example.com ns.example.com mustermann.de ns.google.de) | |
LOGPATH="/var/log/iplog" | |
COUNTER=1 | |
for RECORD in ${RECORDS[@]}; do | |
if [[ ! $(($COUNTER % 2)) -eq 0 ]]; then | |
DOMAIN=$RECORD |
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 alpine | |
COPY names-generator / | |
EXPOSE 8080 | |
CMD ["/names-generator"] |
OlderNewer