Skip to content

Instantly share code, notes, and snippets.

@Bonenk
Bonenk / examplle.md
Last active June 15, 2023 10:55
Express Pagination Nunjucks

Nunjucks pagination component

<div class="flex flex-wrap items-center justify-center my-3">
            {% if current_page > 1 %}
            <a href="/games/?page={{ current_page | int - 1 }}"
                class="px-4 py-2 m-2 font-semibold text-gray-200 border-4 border-gray-200 rounded-lg text-md hover:bg-blue-500 hover:border-blue-500">
                &#x276C;&#x276C; Prev </a>
            {% endif %}
            {% if current_page > 1 %}
                {% if current_page > 2 %}
@Bonenk
Bonenk / nginx-tuning.md
Created July 29, 2022 11:51 — forked from EmranAhmed/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.