by Cloud Watch and Lamda Function
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
## wget *.tar.gz to stdout and g-unzip | |
function wgetgz(){ | |
wget -q -O - $1 | tar -zxv --directory "${2:.}" | |
} |
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 | |
# License: WTFPL | |
## install geoip first | |
# apt-get install geoip-bin geoip-database | |
## /etc/hosts.allow | |
# sshd: ALL: aclexec /opt/scripts/ip-filter.sh %a | |
## /etc/hosts.deny | |
## sshd: ALL |
########################################
## BEGIN NGINX SETUP from scratch
########################################
DEBIAN_CODE=$(dpkg --status tzdata|grep Provides|cut -f2 -d'-')
NGINX_DEB_MAINLINE="http://nginx.org/packages/mainline/debian/"
NGINX_DEB_STABLE="http://nginx.org/packages/debian/"
# change distribution you want here
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
# after update run `sudo sysctl -p` | |
# Avoid a smurf attack | |
net.ipv4.icmp_echo_ignore_broadcasts = 1 | |
# Turn on protection for bad icmp error messages | |
net.ipv4.icmp_ignore_bogus_error_responses = 1 | |
# Turn on syncookies for SYN flood attack protection | |
net.ipv4.tcp_syncookies = 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
# Pull base image. | |
FROM launcher.gcr.io/google/debian8:latest | |
# Install Java. | |
RUN \ | |
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \ | |
add-apt-repository -y ppa:webupd8team/java && \ | |
apt-get update && \ | |
apt-get install -y oracle-java8-installer && \ | |
rm -rf /var/lib/apt/lists/* && \ |
OlderNewer