Skip to content

Instantly share code, notes, and snippets.

@marcelofabianov
marcelofabianov / GitCommitEmoji.md
Created November 22, 2022 19:57 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@marcelofabianov
marcelofabianov / nginx-tuning.md
Created August 23, 2021 16:04 — 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.

@marcelofabianov
marcelofabianov / php-docker-ext
Created July 25, 2019 20:10 — forked from hoandang/php-docker-ext
Complete list of 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/
function throttle( fn, time ) {
var t = 0;
return function() {
var args = arguments, ctx = this;
clearTimeout(t);
t = setTimeout( function() {
fn.apply( ctx, args );
}, time );
};
<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