Skip to content

Instantly share code, notes, and snippets.

View dyrkow's full-sized avatar
🫐
Working...

Dyrkow Andrew dyrkow

🫐
Working...
View GitHub Profile
/*========== Desktop First Method ==========*/
/* Large Devices, Wide Screens */
@media only screen and (max-width : 1200px) {
}
/* Medium Devices, Desktops */
@media only screen and (max-width : 992px) {
/*========== Desktop First Method ==========*/
/* Large Devices, Wide Screens */
@media only screen and (min-width : 1200px) {
}
/* Medium Devices, Desktops */
@media only screen and (min-width : 992px) {
# adding
git config --global alias.hist "..." or git config --global alias.hist log
## great log commit
log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all
Установка vim-plug на windows x64
1. Скачать файл plug.vim и поместить его в папку Vim/vimfiles/autoload
2. Добавить в переменную окружения путь до ядра системы контроля версий Git
Так как он его использует для загрузки модулей. Например G:\ProgrammFiles\Git\mingw64\libexec\git-core
3. Ну и добавить соответственно конфиг, команда PlugInstall должна появиться.
Добавление цветовой схемы
1. Скачать файл с схемой
2. Поместить её в папку Vim/vimfiles/colors
function guid() {
function gen4() {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
return gen4() + gen4() + '-' + gen4() + '-' + gen4() + '-' + gen4() + '-' + gen4() + gen4() + gen4();
}
# specify additional headers (this one is useful for development)
static -H '{"Cache-Control": "no-cache, must-revalidate"}'
serving "." at http://127.0.0.1:8080
//Async func run one by one
function wait(callback) {
var queue = [];
function _next() {
var cb = queue.shift(),
args = [].slice.call(arguments);
if (cb) {
:root {
font-size: 12px;
}
@media (min-width: 768px) {
:root {
font-size: 14px;
}
}
@media (min-width: 992px) {
:root {
@dyrkow
dyrkow / filter.js
Last active December 30, 2018 12:52
Цифровые фильтры изображений
const fs = require('fs');
const bmp = require('bmp-js');
const FILE_NAME = 'photo.bmp';
const SAVE_NAME = 'new-photo.bmp';
const MAX_VALUE = 255;
const BR = 70; // коэффециент осветления
const CST = 0.6; // коэффециент увеличения контрастности
const NOISE = 0.2;// интенсивность шума
@dyrkow
dyrkow / pipeline
Created December 30, 2018 13:37
pipeline pattern
const pipe = (...fns) => (param) => fns.reduce((result, func) => func(result), param)
// Создаем pipe для обработки значения из поля формы
const value = pipe(trim, limit, shield)('some value')
| | |
обрезать пробелы - - | - - - экранировать символы
ограничить значение по длине
trim, limit, shield типовые функции имеющие следующий интерфейс fn(value) => value