Skip to content

Instantly share code, notes, and snippets.

View MaximStrutinskiy's full-sized avatar
✍️
Open to new offers.

Maxim Strutinskiy MaximStrutinskiy

✍️
Open to new offers.
View GitHub Profile
@MaximStrutinskiy
MaximStrutinskiy / domain
Last active September 13, 2018 22:17
Nginx config with reverse proxy + ssl(https)
server {
listen 80 ;
listen [::]:80;
server_name newstore.com.ua www.newstore.com.ua;
return 301 https://www.$server_name$request_uri;
}
server {
listen 443 ssl;
listen [::]:443;
@MaximStrutinskiy
MaximStrutinskiy / macro.html.twig
Last active December 3, 2018 19:40
Twig macro - [time ~ 2.8s]
{% import _self as recursive_category_macro %}
{% macro recursive_category(category, recursive_category_macro) %}
<li>
<h4>{{ category.nameRu }}</h4>
{% if category.SChildren|length %}
<ul>
{% for child in category.SChildren %}
{{ recursive_category_macro.recursive_category(child, recursive_category_macro) }}