- http://orbitalmedia.com.au
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
| AWSTemplateFormatVersion: '2010-09-09' | |
| Description: SSM PrivateLink Setup with VPC, Subnet, Security Group, Endpoints, IAM Role, and EC2 Instance | |
| Resources: | |
| VPC: | |
| Type: AWS::EC2::VPC | |
| Properties: | |
| CidrBlock: 10.0.0.0/16 | |
| EnableDnsHostnames: true | |
| EnableDnsSupport: true |
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
| apiVersion: v1 | |
| kind: ReplicationController | |
| metadata: | |
| name: traefik-ingress-controller | |
| namespace: default | |
| labels: | |
| app: traefik-ingress-lb | |
| spec: | |
| replicas: 1 | |
| selector: |
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
| sudo::configs: | |
| 'admins': | |
| 'content' : "%prodadmins ALL=(ALL) NOPASSWD: ALL" | |
| 'priority' : 10 |
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
| # compile iptables from source and install to /usr/local | |
| mkdir -p /tmp/iptables | |
| wget "http://www.netfilter.org/projects/iptables/files/iptables-1.4.21.tar.bz2" -qO- | tar --strip-components=1 -C /tmp/iptables -xvj | |
| cd /tmp/iptables | |
| ./configure | |
| make | |
| make install | |
| # set alternatives | |
| sudo alternatives --install /sbin/iptables iptables.x86_64 /usr/local/sbin/iptables 100 \ |
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
| package main | |
| import ( | |
| "fmt" | |
| "github.com/codegangsta/negroni" | |
| "github.com/gorilla/mux" | |
| "log" | |
| "net/http" | |
| ) |
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
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "github.com/gorilla/mux" | |
| ) | |
| func handler(name string)func (http.ResponseWriter, *http.Request) { | |
| dummyHandler := func (w http.ResponseWriter, r *http.Request) { |
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
| package main | |
| import ( | |
| "fmt" | |
| "github.com/gorilla/mux" | |
| "net/http" | |
| ) | |
| func main() { | |
| r := mux.NewRouter() |
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
| package main | |
| import ( | |
| "github.com/codegangsta/negroni" | |
| "github.com/gorilla/mux" | |
| ) | |
| func main() { | |
| router := mux.NewRouter() | |
| apiV1 := router.PathPrefix("/api/v1").Subrouter() |
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
| #! /usr/bin/env python | |
| import argparse | |
| import sys | |
| import re | |
| import time | |
| line_nginx_full = re.compile(r"""(?P<ipaddress>\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}) - - \[(?P<dateandtime>\d{2}\/[a-z]{3}\/\d{4}:\d{2}:\d{2}:\d{2} (\+|\-)\d{4})\] ((\"(GET|POST) )(?P<url>.+)(http\/1\.1")) (?P<statuscode>\d{3}) (?P<bytessent>\d+) (["](?P<refferer>(\-)|(.+))["]) (["](?P<useragent>.+)["])""", | |
| re.IGNORECASE) | |
| line_nginx_onlyStatus = re.compile(r'.+HTTP\/1\.1" (?P<statuscode>\d{3})') |
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
| # update packages | |
| sudo apt-get update | |
| # install python and graphite dependencies | |
| sudo apt-get install -y python python-dev python-virtualenv libevent-dev python-pip python-cairo python-django-tagging python-twisted python-memcache python-pysqlite2 | |
| # install web server | |
| sudo apt-get install -y nginx uwsgi uwsgi-plugin-python | |
| # install postgresql and dependencies |
NewerOlder