Skip to content

Instantly share code, notes, and snippets.

View jeffersonsouza's full-sized avatar

Jefferson Souza jeffersonsouza

View GitHub Profile
@jeffersonsouza
jeffersonsouza / custom.conf
Created January 15, 2022 14:15
HaProxy Security Headers configs
frontend 443
# Security Headers
http-response del-header server
http-response del-header link # wordpress specific
http-response del-header x-powered-by
http-response set-header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;"
http-response set-header X-Frame-Options "SAMEORIGIN"
http-response set-header X-XSS-Protection "1; mode=block"
http-response set-header X-Content-Type-Options "nosniff"
http-response set-header Referrer-Policy no-referrer-when-downgrade
@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
{
// Copie daqui
"Init PyGame": {
"prefix": "pygame.init",
"body": [
"import pygame",
"from collections import namedtuple",
"",
"# Game init",
@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
frontend 80
acl letsencrypt path_beg /.well-known/acme-challenge/
redirect scheme https code 301 if !letsencrypt !{ ssl_fc }
@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.

-- Get active queries with duration greater than 1 sec
SELECT (now() - query_start) as duracao, pid, query, usename, datname
FROM pg_stat_activity
WHERE state = 'active'
AND query_start < now() - '1 seconds'::interval
AND pid <> pg_backend_pid()
ORDER BY query_start ASC
http://www.colourlovers.com/palette/4592346/Polybag_Palette
#4692D2,#3DD698,#7876E5,#FFD249,#FF4C00,#4692D2,#3DD698,#7876E5
http://www.colourlovers.com/palette/15/tech_light
#D1E751,#FFFFFF,#000000,#4DBCE9,#26ADE4,#D1E751,#FFFFFF,#000000
http://www.colourlovers.com/color/4391D2/blue_water
#4391D2
@jeffersonsouza
jeffersonsouza / docker-compose.yml
Created August 20, 2018 23:12
Docker Compose for Graylog
version: '2'
services:
# MongoDB: https://hub.docker.com/_/mongo/
mongodb:
image: mongo:3
# Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docker.html
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.3
environment:
- http.host=0.0.0.0