Skip to content

Instantly share code, notes, and snippets.

View miripiruni's full-sized avatar

Slava Oliyanchuk miripiruni

View GitHub Profile
@miripiruni
miripiruni / wishlist.md
Last active October 12, 2015 03:47 — forked from pepelsbey/wishlist.md
Список желаний
@miripiruni
miripiruni / dabblet.css
Created October 11, 2013 16:16
Untitled
body {padding-top: 40px;}
* {margin:0;padding: 0;}
.l,
.r {
display: inline-block;
width: 50%;
background: green;
box-sizing: border-box;
}
@miripiruni
miripiruni / vim-links-and-tips
Created November 20, 2013 18:34
Vim links & tips.
@miripiruni
miripiruni / gist:9109512
Created February 20, 2014 08:55
CSS Rulez Alphabetized
{
"custom_sort_order": true,
"sort_order": [
"animation",
"-moz-animation",
"-ms-animation",
"-o-animation",
"-webkit-animation",
"animation-delay",
"-moz-animation-delay",
@miripiruni
miripiruni / iTerm workflow
Created March 18, 2014 11:30
Простейший applescript, который открывает три сплита в iTerm: в первом — редактирование файлов, во втором — debug-лог, в третьем — error-лог.
launch "iTerm"
tell application "iTerm 2"
activate
-- ssh in split panes to realty2
set myterm to (make new terminal)
tell myterm
launch session "miripiruni"
set number of columns to 200
@miripiruni
miripiruni / bookmarklet.js
Last active October 23, 2015 15:20 — forked from shinypb/gist:4485878
Bookmarklet to reload CSS without reloading the entire page
// Bookmarklet version (made using http://userjs.up.seesaa.net/js/bookmarklet.html)
javascript:(function(){$('link[rel="stylesheet"]').each(function(i,elem){var anchorTag=$('a').attr('href',elem.getAttribute('href'))[0];anchorTag.search="ts="+(+new Date);elem.href=anchorTag.href;})})()
@miripiruni
miripiruni / toc.txt
Last active January 15, 2016 09:52
Table Of Contents for BEM XJST tests
.
├── BEM Context
│   ├── Functions
│   │   ├── apply(str:modeName, Obj:ctx)
│   │   ├── applyCtx()
│   │   ├── applyNext()
│   │   └── local()
│   ├── modify prototype
│   ├── prototype
│   │   ├── attrEscape()
@miripiruni
miripiruni / txt.txt
Created February 24, 2016 23:57
Правки по документации bem-xjst
https://ru.bem.info/technology/bemhtml/v2/rationale/
Отличительные черты и Преимущества
Расписать с примерами
— Возможность добавления шаблонов в рантайме.
— Не требует компиляции шаблонов.
Поставить ссылки:
— BEMHTML
@miripiruni
miripiruni / error-no-block.js
Last active March 1, 2016 12:08
Improved error msg about no block sub predicate (print out template)
var bemxjst = require('./');
// BEMHTML движок
var bemhtml = bemxjst.bemhtml;
// Компиляция шаблонов
// bemhtml.compile бросит ошибку
var templates = bemhtml.compile(function() {
// нет подпредиката для блока
elemMod('em', 'ev')
.mod('m', 'v')
var bemxjst = require('./');
var bemhtml = bemxjst.bemhtml;
// Add templates
var templates = bemhtml.compile(function() {
// true/false в аттрибутах
block('*').def()(function() {
var ret = applyNext();
var ctx = this.ctx;