Skip to content

Instantly share code, notes, and snippets.

Avatar

Artem Kuznecov artemijeka

  • ИП Кузнецов Артем Андреевич
  • Samara
  • 19:52 (UTC +04:00)
View GitHub Profile
@artemijeka
artemijeka / minification.md
Created November 18, 2021 19:21 — forked from gaearon/minification.md
How to Set Up Minification
View minification.md

In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.

Here's one way to set it up:

  1. Install Node.js
  2. Run npm init -y in your project folder (don't skip this step!)
  3. Run npm install terser

Now, to minify a file called like_button.js, run in the terminal:

View art-reset.css
/********************************* art-reset *********************************/
/**
* v1.8 - 20.04.2023
* License: none (public domain)
* Частично взято (и модифицировано) с https://webcademy.ru/blog/739/
**/
* {
padding: 0px;
margin: 0px;
border: none;
@artemijeka
artemijeka / result_modifier.php
Last active October 25, 2019 17:01 — forked from kvalexandr/Bitrix Next and Prev news.detail
Bitrix next and prev elements of news.detail. Следующий и предыдущий элемент в news.detail.
View result_modifier.php
В result_modifier.php шаблона вставляем:
<?
/**
* Находим предыдущий и следующий элемент портфолио.
*/
// сортировку берем из параметров компонента
$arSort = array(
$arParams["SORT_BY1"] => $arParams["SORT_ORDER1"],
$arParams["SORT_BY2"] => $arParams["SORT_ORDER2"],
@artemijeka
artemijeka / gulpfile.js
Created October 4, 2019 10:27 — forked from LoyEgor/gulpfile.js
best image compression settings (gulp-imagemin)
View gulpfile.js
// install
// npm i gulp-cache gulp-imagemin imagemin-pngquant imagemin-zopfli imagemin-mozjpeg imagemin-giflossy -f
// node node_modules/jpegtran-bin/lib/install.js
// node node_modules/gifsicle/lib/install.js
// node node_modules/zopflipng-bin/lib/install.js
// node node_modules/mozjpeg/lib/install.js
// node node_modules/giflossy/lib/install.js
// node node_modules/pngquant-bin/lib/install.js