Skip to content

Instantly share code, notes, and snippets.

View M-O-Z-G's full-sized avatar

Aleksandr "M.O.Z.G" Dikov M-O-Z-G

View GitHub Profile
@M-O-Z-G
M-O-Z-G / my-ublock-static-filters.txt
Created April 14, 2021 03:26
Custom uBlock filter rules
@@||lkplm.pfr.ru/$document
@@||www.whatfontis.com/$document
@@||www.airbnb.com/$document
blenderartists.org##DIV[id="ad_global_below_navbar"]
rutracker.org##IMG[src="http://195.82.146.52/240x400/0825_1.gif"]
delicious.com##[class="ad-container taboola-feed-ads-outer"]
rutracker.org##[id="bn-idx-skidka"][class="bn-idx"]
rutracker.org##IFRAME[src="http://static2.rutracker.org/iframe/adselector-240x400.html?rnd=0.06211164430715144"]
rutracker.org##IFRAME[src="http://static2.rutracker.org/iframe/adselector-240x400.html?rnd=0.9607356840278953"]
www.livelib.ru##[class="meganfox"]
@M-O-Z-G
M-O-Z-G / links.styl
Created November 14, 2020 16:22
Style Links Depending on Destination
@M-O-Z-G
M-O-Z-G / scrollbar.styl
Created May 27, 2020 04:32
Custom scrollbar Stylus mixin for Google Chrome and Mozilla Firefox 64+.
$scrollbar-width= 5px
$scrollbar-color= red
$scrollbar-background= transparent
$scrollbar-thumb-radius= 6px
$scrollbar-thumb-border-thickness= 0px
scrollbar()
scrollbar-width: thin
scrollbar-color: transparent transparent
transition: scrollbar-color 300ms
@M-O-Z-G
M-O-Z-G / tsconfig.json
Created May 7, 2020 14:57
TypeScript config template
{
"compilerOptions": {
/* Basic Options */
"target":
"es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */,
"module":
"commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
// "lib": ["es2015", "dom"], /* Specify library files to be included in the compilation: */
// "newLine": "LF", /* Use the specified end of line sequence to be used when emitting files: "crlf" (windows) or "lf" (unix).” */
// "allowJs": true, /* Allow javascript files to be compiled. */
@M-O-Z-G
M-O-Z-G / parcel.postbuild.js
Created May 6, 2020 14:50
Parcel.js: moving static resources to a separate folder
/* Copyright 2019 by Paolo Mioni (@paolomioni)
* Based on the article https://medium.com/hceverything/parcel-js-moving-static-resources-to-a-separate-folder-aef63a038cbd.
*
* EXAMPLE OF USAGE:
* build": "parcel build pages/index.hbs --out-dir public --no-cache && node postbuild.js
*/
const fs = require('fs');
const path = require('path');
const replace = require('replace-in-file');
@M-O-Z-G
M-O-Z-G / riot.config.js
Created May 6, 2020 14:22
Base Riot.JS config template with Pug+TypeScript+Stylus precompilers. Use `stylus = require('stylus')` if you use it outside any Gulp environment. It was just the my case, and I want to keep it like it is.
const { registerPreprocessor } = require('@riotjs/compiler'),
pug = require('pug'),
ts = require('typescript'),
stylus = require('gulp-stylus').stylus;
registerPreprocessor('template', 'pug', function(code, { options }) {
const { file } = options
console.log('Compile the Pug code in', file)
@M-O-Z-G
M-O-Z-G / _mediaCombined.styl
Created May 6, 2020 14:20
Media query for mobile devices
//
// Media query for mobile devices
//
// SHORTNAME - DEVICE NAME
//
// AW - Apple Watch
// GF2 - Galaxy S2
// GF3 - Galaxy S3
// GS4-5-N3 - Galaxy S4, S5, Note 3
// GS5 - Galaxy S5
@M-O-Z-G
M-O-Z-G / gulpfile.js
Created May 6, 2020 14:18
Gulp 4.x config template. There're a lot of key changes between Gulp 3.x and 4.x. Here's example of code written with respect of Gulp 4.x requirements and ECMAScript 6.
"use strict";
// Load plugins
const autoprefixer = require("autoprefixer");
const browsersync = require("browser-sync").create();
const cp = require("child_process");
const cssnano = require("cssnano");
const del = require("del");
const eslint = require("gulp-eslint");
const gulp = require("gulp");
@M-O-Z-G
M-O-Z-G / kerning_pairs_4_auto-kern_short.txt
Created February 19, 2020 10:10
Cyrillic-Latin kerning pairs (Short)
А. Б. В. Г. Д. Е. Ё. Ж. З. И. Й. К. Л. М. Н. О. П. Р. С. Т. У. Ф. Х. Ц. Ч. Ш. Щ. Ъ. Ы. Ь. Э. Ю. Я.
А, Б, В, Г, Д, Е, Ё, Ж, З, И, Й, К, Л, М, Н, О, П, Р, С, Т, У, Ф, Х, Ц, Ч, Ш, Щ, Ъ, Ы, Ь, Э, Ю, Я,
A. B. C. D. E. F. G. H. I. J. K. L. M. N. O. P. Q. R. S. T. U. V. W. X. Y. Z.
A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z,
-А -Б -В -Г -Д -Е -Ё -Ж -З -И -Й -К -Л -М -Н -О -П -Р -С -Т -У -Ф -Х -Ц -Ч -Ш -Щ -Ъ -Ы -Ь -Э -Ю -Я
-A -B -C -D -E -F -G -H -I -J -K -L -M -N -O -P -Q -R -S -T -U -V -W -X -Y -Z
А- Б- В- Г- Д- Е- Ё- Ж- З- И- Й- К- Л- М- Н- О- П- Р- С- Т- У- Ф- Х- Ц- Ч- Ш- Щ- Ъ- Ы- Ь- Э- Ю- Я-
A- B- C- D- E- F- G- H- I- J- K- L- M- N- O- P- Q- R- S- T- U- V- W- X- Y- Z-
—А —Б —В —Г —Д —Е —Ё —Ж —З —И —Й —К —Л —М —Н —О —П —Р —С —Т —У —Ф —Х —Ц —Ч —Ш —Щ —Ъ —Ы —Ь —Э —Ю —Я
—A —B —C —D —E —F —G —H —I —J —K —L —M —N —O —P —Q —R —S —T —U —V —W —X —Y —Z
@M-O-Z-G
M-O-Z-G / kerning_pairs_4_auto-kern.txt
Created February 19, 2020 10:08
Cyrillic-Latin kerning pairs
А. Б. В. Г. Д. Е. Ё. Ж. З. И. Й. К. Л. М. Н. О. П. Р. С. Т. У. Ф. Х. Ц. Ч. Ш. Щ. Ъ. Ы. Ь. Э. Ю. Я. -А -Б -В -Г -Д -Е -Ё -Ж -З -И -Й -К -Л -М -Н -О -П -Р -С -Т -У -Ф -Х -Ц -Ч -Ш -Щ -Ъ -Ы -Ь -Э -Ю -Я А- Б- В- Г- Д- Е- Ё- Ж- З- И- Й- К- Л- М- Н- О- П- Р- С- Т- У- Ф- Х- Ц- Ч- Ш- Щ- Ъ- Ы- Ь- Э- Ю- Я- "А "Б "В "Г "Д "Е "Ё "Ж "З "И "Й "К "Л "М "Н "О "П "Р "С "Т "У "Ф "Х "Ц "Ч "Ш "Щ "Ъ "Ы "Ь "Э "Ю "Я А" Б" В" Г" Д" Е" Ё" Ж" З" И" Й" К" Л" М" Н" О" П" Р" С" Т" У" Ф" Х" Ц" Ч" Ш" Щ" Ъ" Ы" Ь" Э" Ю" Я" а. б. в. г. д. е. ё. ж. з. и. й. к. л. м. н. о. п. р. с. т. у. ф. х. ц. ч. ш. щ. ъ. ы. ь. э. ю. я. -а -б -в -г -д -е -ё -ж -з -и -й -к -л -м -н -о -п -р -с -т -у -ф -х -ц -ч -ш -щ -ъ -ы -ь -э -ю -я а- б- в- г- д- е- ё- ж- з- и- й- к- л- м- н- о- п- р- с- т- у- ф- х- ц- ч- ш- щ- ъ- ы- ь- э- ю- я- "а "б "в "г "д "е "ё "ж "з "и "й "к "л "м "н "о "п "р "с "т "у "ф "х "ц "ч "ш "щ "ъ "ы "ь "э "ю "я а" б" в" г" д" е" ё" ж" з" и" й" к" л" м" н" о" п" р" с" т" у" ф" х" ц" ч" ш" щ" ъ" ы" ь" э" ю" я” АА АБ АВ АГ АД АЕ АЁ АЖ АЗ АИ АЙ А