Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View belocer's full-sized avatar
💭
My blog. good-code.ru

Денис Белоцерковец belocer

💭
My blog. good-code.ru
View GitHub Profile
@picpoint
picpoint / minify
Last active May 13, 2019 18:21
Simple minify to files
const fs = require('fs'); // подключаем модуль файловой системы
const output = fs.createWriteStream('script.min.js'); // в константу записывает исходящий поток, которая создаёт файл
fs.readFile('script.js', 'utf-8', function (err, data) { // читаем файл
if (err) {
throw new Error('ERROR TO READ FILE...'); // если ошибка, выбрасываем исключение
} else {
for (let i = 0; i < data.length; i++) { // пробегаемся по всем символам
if (data[i] != ' ' && data[i] != '' && data[i] != '\n' && data[i] != '\t') { // если не '', ' ', \n, \t
output.write(data[i]); // записываем каждый символ в файл
@picpoint
picpoint / IO to Nodejs
Created April 28, 2019 09:14
simple code to IO in Nodejs
const stdin = process.stdin;
const stdout = process.stdout;
stdout.write('Enter you name -> ');
stdin.on('data', function (data) {
stdout.write('Your name is -> ');
var name = data.toString().trim();
stdout.write(name + '\n');
stdout.write('Your name to reverse -> ' + name.toString().split('').reverse().join('') + '\n');

GitHub Gist - настройка и установка в JetBrains PhpStorm

  1. Установка плагина Get Gist Beta в PhpStorm
  1. В настройках плагина вводим пароль или генерируем токен на GitHub

P.S. К сожалению в Windows плагин работает не корректно c кодировкой Win-1251. Проблема до сих пор актуальна.

/*====== Screen-Size ====== */
@screen-iphone-max: 480px;
@screen-xs-max: 767px;
@screen-sm-min: 768px;
@screen-sm-max: 991px;
@screen-md-min: 992px;
@screen-md-max: 1199px;
@screen-lg-min: 1200px;
/*========= Media ========= */