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 | |
shopt -s extglob # Required to trim whitespace | |
RESOURCE=$1 | |
AGE=$2 | |
HOST=$3 | |
GREEN=$(tput setaf 2) | |
RED=$(tput setaf 1) | |
WHITE=$(tput setaf 7) |
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
function strsplit(inputstr, sep) | |
if sep == nil then | |
sep = "%s" | |
end | |
local t={} ; i=1 | |
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do | |
t[i] = str | |
i = i + 1 | |
end | |
return t |
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
FROM zokeber/centos:latest | |
MAINTAINER Mark Kelly <[email protected]> | |
RUN touch /var/lib/rpm/* | |
RUN yum install -y deltarpm; yum clean all | |
RUN yum install -y sudo; yum clean all | |
# Set versions. Check http://openresty.org for latest version and bundled version of nginx. | |
ENV OPENRESTY_VERSION 1.9.3.1 | |
ENV NGINX_VERSION 1.9.3 |
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 | |
set -o errexit | |
clear | |
# Set versions. Check http://openresty.org for latest version and bundled version of nginx. | |
OPENRESTY_VERSION=1.9.3.1 | |
NGINX_VERSION=1.9.3 | |
OPENSSL_VERSION=1.0.2d | |
NPS_VERSION=1.9.32.10 |
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
#Simplified for illustrative purposes. | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; |
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
local log = ngx.log | |
local exit = ngx.exit | |
local null = ngx.null | |
local ERR = ngx.ERR | |
local INFO = ngx.INFO | |
local DEBUG = ngx.DEBUG | |
local HTTP_INTERNAL_SERVER_ERROR = ngx.HTTP_INTERNAL_SERVER_ERROR | |
-- Setup Redis connection | |
local redis = require "resty.redis" |
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
-- Setup Redis connection | |
local redis = require "resty.redis" | |
local red = redis:new() | |
local ok, err = red:connect("127.0.0.1", "6379") | |
if not ok then | |
ngx.log(ngx.INFO, "REDIS: Failed to connect to redis: " .. err) | |
return ngx.exit(ngx.HTTP_INTERNAL_SERVER_ERROR) | |
end |
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 | |
# | |
# nginx - this script starts and stops the nginx daemin | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /usr/local/nginx/conf/nginx.conf | |
# pidfile: /usr/local/nginx/logs/nginx.pid |
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 | |
set -o errexit | |
clear | |
# Set versions. Check http://openresty.org for latest version and bundled version of nginx. | |
OPENRESTY_VERSION=1.9.3.1 | |
NGINX_VERSION=1.9.3 | |
OPENSSL_VERSION=1.0.2d | |
# Install some pre-requisites |
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 | |
set -o errexit | |
clear | |
# Set versions. Check http://openresty.org for latest version and bundled version of nginx. | |
OPENRESTY_VERSION=1.9.3.1 | |
NGINX_VERSION=1.9.3 | |
OPENSSL_VERSION=1.0.2d | |
LUANGINX_VERSION=0.9.16 |
NewerOlder