Skip to content

Instantly share code, notes, and snippets.

View efiku's full-sized avatar
💬
🗡

Krzysztof Pazdur efiku

💬
🗡
  • Poland
View GitHub Profile
@efiku
efiku / nginx-tuning.md
Created December 17, 2021 20:44 — 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.

@efiku
efiku / zadanie.md
Last active September 12, 2016 16:55 — forked from efik/zadanie.md
Zadanie z PHP

POCZĄTEK ZADANIA


poniżej prezentowany jest zrzut tabeli z bazy mysql z odczytami z wirtualnego licznika gazu w pewnym domu. tabela posiada 3 kolumny: id odczytu z licznika, wartość wyrażona w m^3) oraz datę odczytu. Twoim zadaniem jest napisanie skryptu w języku php, który odczyta i przetworzy te dane.

###1.Napisz kod, który będzie miał za zadanie odbierać z tabeli odczyty z danego okresu i zwrócić je w formie tablicy asocjacyjnej DATA => Odczyt

@efiku
efiku / plik.sql
Created February 26, 2016 12:30 — forked from efik/plik.sql
Plik z dumpem
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Czas wygenerowania: 04 Maj 2015, 16:02
-- Wersja serwera: 5.5.43-0ubuntu0.14.04.1
-- Wersja PHP: 5.6.8-1+deb.sury.org~trusty+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
@efiku
efiku / test
Last active September 12, 2016 16:56
default sites-available file
server {
listen 80;
listen [::]:80;
root /var/www/html/web;
index index.html index.htm index.php;
server_name test;
location / {
try_files $uri $uri/ =404;
}
@efiku
efiku / Repository.cpp
Created December 29, 2015 12:43
Repository class.
class Repository
{
public:
template <typename _Resource = ServiceInterface>
bool create(const string& resourceId_);
template <typename _Resource = ServiceInterface>
_Resource& get(const string& resourceId_);
void release(const string& resourceId_);