Skip to content

Instantly share code, notes, and snippets.

View jeffersonsouza's full-sized avatar

Jefferson Souza jeffersonsouza

View GitHub Profile
@jeffersonsouza
jeffersonsouza / README-Template.md
Created October 17, 2016 19:54 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisities

# Update package information, ensure that APT works with the https method, and that CA certificates are installed.
apt-get update
apt-get install apt-transport-https ca-certificates
# Add the new GPG key.
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo 'deb https://apt.dockerproject.org/repo ubuntu-xenial main' >> /etc/apt/sources.list.d/docker.list
apt-get update
FROM debian:jessie
MAINTAINER Jefferson Souza <[email protected]>
RUN apt-get -q update && \
apt-get install -y --no-install-recommends openjdk-7-jre-headless git openssh-server && \
apt-get -q autoremove && \
apt-get -q clean -y && rm -rf /var/lib/apt/lists/* && rm -f /var/cache/apt/*.bin && \
sed -i 's|session required pam_loginuid.so|session optional pam_loginuid.so|g' /etc/pam.d/sshd &&\
mkdir -p /var/run/sshd
# based on Dennis Bruijn article on https://medium.freecodecamp.com/atom-treasures-82a64ac391c
apm install minimap \
minimap-cursorline \
pigments \
emmet \
double-tag \
linter \
atom-beautify \
autoclose-html \
fuzzy-finder \
# Install Docker latest
apt-get update
apt-get install apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo 'deb https://apt.dockerproject.org/repo ubuntu-trusty main' > /etc/apt/sources.list.d/docker.list
apt-get update
apt-get purge lxc-docker
# HA Proxy http->https config
# ... #
frontend http-frontend
mode http
bind *:80
redirect scheme https if !{ ssl_fc }
@jeffersonsouza
jeffersonsouza / cors.nginxconf
Created April 23, 2016 13:32 — forked from pauloricardomg/cors.nginxconf
Nginx configuration for CORS-enabled HTTPS proxy with origin white-list defined by a simple regex
#
# Acts as a nginx HTTPS proxy server
# enabling CORS only to domains matched by regex
# /https?://.*\.mckinsey\.com(:[0-9]+)?)/
#
# Based on:
# * http://blog.themillhousegroup.com/2013/05/nginx-as-cors-enabled-https-proxy.html
# * http://enable-cors.org/server_nginx.html
#
server {
@jeffersonsouza
jeffersonsouza / nginx.conf
Created March 10, 2016 19:30
NGINX Conf for high performance
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}