Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Marcelo Fabiano marcelofabianov

🎯
Focusing
View GitHub Profile
@marcelofabianov
marcelofabianov / GitCommitEmoji.md
Created Nov 22, 2022 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
View GitCommitEmoji.md
@marcelofabianov
marcelofabianov / nginx-tuning.md
Created Aug 23, 2021 — forked from denji/nginx-tuning.md
NGINX tuning for best performance
View nginx-tuning.md

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.

@marcelofabianov
marcelofabianov / php-docker-ext
Created Jul 25, 2019 — forked from hoandang/php-docker-ext
Complete list of php docker ext
View php-docker-ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
View apache
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName simpletest.localhost
ServerAlias *.simpletest.localhost
DocumentRoot /var/www/simpletest
#SSLEngine on
#SSLCertificateFile /etc/apache2/ssl/server.crt
#SSLCertificateKeyFile /etc/apache2/ssl/server.key
View teste
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};