Skip to content

Instantly share code, notes, and snippets.

@eduavila
eduavila / nginx-tuning.md
Created February 7, 2024 14:31 — 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.

@eduavila
eduavila / ubuntu-acesso-ssh-root.md
Created November 27, 2023 17:45 — forked from fabianogoes/ubuntu-acesso-ssh-root.md
LIBERANDO O USUÁRIO ROOT PARA ACESSO REMOTO VIA SSH

LIBERANDO O USUÁRIO ROOT PARA ACESSO REMOTO VIA SSH

Configurando uma máquina linux para liberar acesso remoto via ssh para o usuário root.

Instalar openssh-server

apt-get install openssh-server

Configurar senha para o root

@eduavila
eduavila / .github-workflows-main.yml
Created March 25, 2021 20:54 — forked from edvinasbartkus/.github-workflows-main.yml
Github Action for React Native Detox
name: Detox
on: [push]
jobs:
build:
runs-on: macOS-latest
timeout-minutes: 15
env:
@eduavila
eduavila / supervisord.service
Created May 13, 2019 15:08 — forked from mozillazg/supervisord.service
install and configure supervisord on centos 7.
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/bin/supervisord -c /etc/supervisord/supervisord.conf
ExecReload=/bin/supervisorctl reload
ExecStop=/bin/supervisorctl shutdown
@eduavila
eduavila / request.js
Created September 2, 2018 13:52 — forked from sheharyarn/request.js
Axios Request Wrapper for React (https://to.shyr.io/axios-requests)
/**
* Axios Request Wrapper
* ---------------------
*
* @author Sheharyar Naseer (@sheharyarn)
* @license MIT
*
*/
import axios from 'axios'
@eduavila
eduavila / replaceAt
Created August 13, 2018 20:09 — forked from efenacigiray/replaceAt
Javascript replace char at index
function replaceAt(string, index, replace) {
return string.substring(0, index) + replace + string.substring(index + 1);
}
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using NHibernate;
using NHibernate.Linq;
public interface IEntity<TIdentity>
@eduavila
eduavila / ALTERNATIVES.adoc
Created June 21, 2017 05:08 — forked from mbbx6spp/ALTERNATIVES.adoc
Super quick list of alternatives to Jira and/or Confluence, Stash, Crucible, etc.
@eduavila
eduavila / Repository.cs
Created March 21, 2017 22:01 — forked from ChrisMcKee/Repository.cs
Generic Repository Interface and implementation. NHIBERNATE
namespace Core.Repository
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
public interface IRepository<T> where T : class
{
bool Add(T entity);
@eduavila
eduavila / gist:da871ee00ffb4ec0feaf
Created February 1, 2016 20:15 — forked from TiuTalk/gist:1045708
Habilitando GZIP em servidores Nginx
# Habilita o gzip
gzip on;
gzip_http_version 1.1;
gzip_vary on;
gzip_comp_level 6;
gzip_proxied any;
# Mime-types que serão compactados
gzip_types text/html text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;