Skip to content

Instantly share code, notes, and snippets.

View rafaelqm's full-sized avatar
🎯
Focusing

Rafael Querino Moreira rafaelqm

🎯
Focusing
View GitHub Profile
@rafaelqm
rafaelqm / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@rafaelqm
rafaelqm / macosx-install-php-oracle-oci8-pdo_oci.md
Created April 13, 2017 14:28 — forked from krisanalfa/macosx-install-php-oracle-oci8-pdo_oci.md
Install OCI8 and / or PDO_OCI on OSX via Brew

Installation

This procedure is tested on Mac OS X 10.10.5 with Developpers tools installed (xCode).

PHP 5.6 installed with Homebrew.

Preparation

Download the following files from Oracle website (yes, you need to create an account and accept terms):

@rafaelqm
rafaelqm / macosx-install-php-oracle-oci8-pdo_oci.md
Created April 11, 2018 00:01 — forked from alexbonhomme/macosx-install-php-oracle-oci8-pdo_oci.md
Install OCI8 and / or PDO_OCI on OSX via Brew
@rafaelqm
rafaelqm / Laravel PHP7 LEMP AWS.md
Created August 27, 2018 19:33 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 16.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 16.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@rafaelqm
rafaelqm / delete_merged_remote_branches.sh
Created September 17, 2018 14:26 — forked from Emuentes/delete_merged_remote_branches.sh
Delete remote git branches that have been merged into develop
# Breakdown of the process
# NOTE: I am searching for branches merged into Develop because I'm using GiT flow
# 1) git branch -r --merged develop
# Get remote branches that have been merged into develop
# 2) grep -v -E '(\*|master|develop)'
# From those branches returned by the above command,
# exclude: master, develop, & the currently selected branch (the branch name beggining with an asterisk)
@rafaelqm
rafaelqm / nginx.conf
Created June 27, 2019 04:34 — forked from v0lkan/nginx.conf
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
@rafaelqm
rafaelqm / nginx-tuning.md
Created June 27, 2019 04:34 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

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.