Skip to content

Instantly share code, notes, and snippets.

View robsonribeiros's full-sized avatar
🏠
Working from home

Robson Ribeiro robsonribeiros

🏠
Working from home
View GitHub Profile
@robsonribeiros
robsonribeiros / nginx.conf
Created June 27, 2020 03:12 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
const multer = require("multer");
const path = require("path");
const crypto = require("crypto");
const aws = require("aws-sdk");
const multerS3 = require("multer-s3");
const storageTypes = {
local: multer.diskStorage({
destination: (req, file, cb) => {
cb(null, path.resolve(__dirname, "..", "..", "tmp", "uploads"));

AWS Fargate Docker Simple Deployment Setup with SSL termination

How to:

  • create a Docker-based AWS Fargate/ECS deployment
  • without the Docker containers having a public IP
  • with an Application Load Balancer as reverse proxy / SSL termination proxy sitting in front of the containers

For Fargate/ECS to be able to access your Docker images hosted on ECR (or somewhere else) you'll have to allow outbound internet access to the Fargate subnets. Here's how you do it.

@robsonribeiros
robsonribeiros / docker-compose.yml
Created January 31, 2020 23:50 — forked from Mau5Machine/docker-compose.yml
Traefik Configuration and Setup
version: "3.3"
services:
################################################
#### Traefik Proxy Setup #####
###############################################
traefik:
image: traefik:v2.0
restart: always
@robsonribeiros
robsonribeiros / dynamic.yaml
Created January 31, 2020 23:50 — forked from Mau5Machine/dynamic.yaml
Traefik Dynamic Configuration File
## Setting up the middleware for redirect to https ##
http:
middlewares:
redirect:
redirectScheme:
scheme: https
@robsonribeiros
robsonribeiros / fibo.go
Created October 30, 2019 00:01
Sequencia de fibonnacci em go
package main
import (
"fmt"
"bufio"
"strings"
"strconv"
"os"
)
@robsonribeiros
robsonribeiros / convert.go
Last active October 29, 2019 23:57
Conversão de temperaturas (Fahrenheit e Celsius) em GO
package main
import (
"fmt"
"bufio"
"strconv"
"os"
"strings"
)