Skip to content

Instantly share code, notes, and snippets.

View jeffersonsouza's full-sized avatar

Jefferson Souza jeffersonsouza

View GitHub Profile
@jeffersonsouza
jeffersonsouza / readme.md
Created March 25, 2021 14:03 — forked from ThePredators/readme-mde.md
Mobile Env Setup

⭐ Setup Mobile Development Environment ⭐

Install HomeBrew

## Install xcode utils
xcode-select --install
## Install Brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
## Check that everything is Ok
brew doctor
@jeffersonsouza
jeffersonsouza / iterm2-solarized.md
Created August 7, 2020 13:49 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@jeffersonsouza
jeffersonsouza / instructions.md
Last active February 26, 2020 16:25 — forked from fridgerator/instructions.md
Auto-renewing Lets Encrypt certificates for Rancher 1.6

Lets Encrypt has removed their ACME V1 api in favor of ACME V2. The Rancher 1.6 catalog entry for Lets Encrypt certificates doesn't support this api. There is a forked version of the repo, however the service has to be created manually instead of from the catalog.

  1. Create a new service, give it a name, use vxcontrol/rancher-letsencrypt:v1.0.0 for the image
  2. In the "Volumes" tab, add a volume /var/lib/rancher:/var/lib/rancher
  3. In the "Command" tab, set the "Console" option to none
  4. Click to add an Environment Variable, and paste the following into the first "Variable" input field.
  • All of the environment variables should auto-fill.
  • Fill in the necessary values
@jeffersonsouza
jeffersonsouza / nginx-tuning.md
Created January 6, 2019 21:22 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

HAProxy behind AWS ELB: how to force HTTPS?

What are you trying to solve

You have some nodes in AWS that you want to load balance.

You want to use the magical scaling properties of ELB.

You want to do some things that ELB doesn't do, like force HTTPS (or add headers, or something else).

@jeffersonsouza
jeffersonsouza / docker-proxy.md
Created October 6, 2017 20:13 — forked from owainlewis/docker-proxy.md
Set docker proxy on Ubuntu 16.04

How to setup docker behing a HTTP proxy

mkdir /etc/systemd/system/docker.service.d

sudo touch /etc/systemd/system/docker.service.d/http-proxy.conf

Add proxy info

@jeffersonsouza
jeffersonsouza / install-docker-elementary-loki.sh
Created August 25, 2017 01:54 — forked from cristofersousa/install-docker-elementary-loki.sh
Installs Docker on Elementary OS 0.4 (Loki)
#!/bin/bash
sudo apt-get install apt-transport-https ca-certificates -y
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo rm -f /etc/apt/sources.list.d/docker.list
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
sudo apt-get install docker-engine
@jeffersonsouza
jeffersonsouza / Enhanced NGINX logstash parser
Created July 5, 2017 21:09 — forked from csamsel/Enhanced NGINX logstash parser
Enhanced NGINX logstash parser to include upstream response time and request length fields
Enhanced NGINX logstash parser:
NGINX log format:
log_format enhanced '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent $request_length "$http_referer" "$http_user_agent" $request_time $upstream_response_time';
access_log /var/log/nginx/access.log enhanced;
error_log /var/log/nginx/error.log;
logstash pattern (/opt/logstash/pattern/nginx):
@jeffersonsouza
jeffersonsouza / xdebug_alpine.md
Created May 3, 2017 18:21 — forked from crittermike/xdebug_alpine.md
Xdebug + PHPStorm for PHP 7 on Alpine Linux

First, install the Xdebug package from the testing repository.

$ apk add php7-xdebug --repository http://dl-3.alpinelinux.org/alpine/edge/testing/

Now edit the /etc/php7/php.ini file and add the following to the end of it:

zend_extension=/usr/lib/php7/modules/xdebug.so
@jeffersonsouza
jeffersonsouza / API.md
Created October 20, 2016 14:00 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method: