Skip to content

Instantly share code, notes, and snippets.

@Dziuperman
Dziuperman / template.php
Created October 15, 2019 15:05
Каталог из разделов #bitrix #bitrix:catalog.section
<?
/***
Получаем массив коллекций, отфильтрованных умным фильтром.
Сравниваются массивы чекнутых свойств фильтра и свойства
всех товаров
***/
/*** Start Массив отфильтрованных коллекций ***/
if (CModule::IncludeModule("iblock")) {
$arSelect = Array("ID", "IBLOCK_ID", "NAME", "PROPERTY_231", "PROPERTY_232");
$arFilter = Array("IBLOCK_ID" => 17, "ACTIVE_DATE" => "Y", "ACTIVE" => "Y");
@Dziuperman
Dziuperman / Connection.php
Last active December 7, 2019 12:30
Query builder #php #OOP #MVC
<?php
namespace Engine\Core\Database;
use \PDO;
use Engine\Core\Config\Config;
class Connection
{
private $link;
@Dziuperman
Dziuperman / download-file.js
Created February 6, 2020 04:32
Download file #js #axios
axios({
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([response.data]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
document.body.appendChild(link);
@Dziuperman
Dziuperman / README.md
Created April 18, 2020 03:58 — forked from kerryboyko/README.md
VueJS Best Practices Guide

Deverus Vue.js Style Guide

Guide for developing Vue.js applications.

v. 0.0.1

Vue.js is an amazing framework, which can be as powerful as Angular or React, the two big heavy hitters in the world of front-end frameworks.

However, most of Vue's ease-of-use is due to the use of Observables - a pattern that triggers re-renders and other function calls with the reassignment of a variable.

@Dziuperman
Dziuperman / what-forces-layout.md
Created September 7, 2020 04:50 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent