Skip to content

Instantly share code, notes, and snippets.

View chayn1k's full-sized avatar

Pavel Tchaikovsky chayn1k

View GitHub Profile
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 12, 2025 14:05
A badass list of frontend development resources I collected over time.
@veged
veged / bemhtml-js-syntax.md
Last active December 20, 2015 14:59
JS-синтаксис для BEMHTML

Синтаксис BEMHTML

Вступление

Мы уже достаточно давно обсуждаем вопрос изменения синтаксиса в BEMHTML. Основные причины такие:

  • "умные" редакторы подсвечивают BEMHTML-код как ошибки
  • незнакомый синтаксис и похожесть на json путает людей и не все пользуются возможностью сэкономить пару символов на кавычках
  • кастомный синтаксис требует компиляции даже для дев-режима, что в свою очередь:
    • не очень быстро (с ростом количества шаблонов просто парсинг уже занимает существенное время)
  • мешает дебажить, т.к. исполняется в итоге не совсем тот код, который пишется
@ebidel
ebidel / Web Components Resources.md
Last active October 12, 2024 17:10
List of resources related to Web Components
@A
A / Gruntfile.js
Last active December 22, 2015 17:19
'use strict';
var path = require('path');
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var folderMount = function folderMount(connect, point) {
return connect.static(path.resolve(point));
};
module.exports = function (grunt) {
// grunt || grunt browser — разработка в браузере
(function ($, BEM) {
'use strict';
var CHANNEL_NAME = 'statistic';
var CHANNEL_EVENT_HIT = 'hit';
var CHANNEL_EVENT_REACH_GOAL = 'reachGoal';
BEM.DOM.decl({
block: 'i-yandexMetrika'
}, {
@larchanka
larchanka / uniqid.js
Last active October 27, 2019 08:51
JavaScript function that copies functionality of PHP's 'uniqid'.
(function () {
this.uniqid = function (pr, en) {
var pr = pr || '', en = en || false, result;
this.seed = function (s, w) {
s = parseInt(s, 10).toString(16);
return w < s.length ? s.slice(s.length - w) : (w > s.length) ? new Array(1 + (w - s.length)).join('0') + s : s;
};
result = pr + this.seed(parseInt(new Date().getTime() / 1000, 10), 8) + this.seed(Math.floor(Math.random() * 0x75bcd15) + 1, 5);
@dr-dimitru
dr-dimitru / Social RESTful URLs snippet.md
Last active January 28, 2023 03:57
Social links, +1s and shares using only HTML (no JS)
@jcppkkk
jcppkkk / OpenWithSublime.bat
Last active July 2, 2025 23:21 — forked from FoxColdMetal/OpenWithSublimeText.bat
[[[ Move to https://github.com/jcppkkk/OpenWithSublime !!! ]]] Add context menu to allow user open file or folder with Sublime as User (or as Admin).
@echo off
:: Path to Sublime Text installation dir.
SET stPath=%~dp0sublime_text.exe
SET stPathOnly=%~dp0
:: Key name for the registry entries.
SET UserEntry=Sublime Text
SET AdminEntry=Sublime Text As Admin
:: Context menu texts.
SET "UserMenuText=Open with Sublime(&-)"
SET "AdminMenuText=Open with Sublime As Admin(&+)"
@arikon
arikon / i-jquery__my-plugin.js
Created February 1, 2014 16:35
jQuery plugin with bem-core
// If you are using borschik to expand links (bem make and enb do this for you)
// you could use this hack for any jQuery plugin found in the wild
modules.define('i-jquery__my-plugin', ['jquery'], function(provide, $){
var jQuery = $,
window = {jQuery: jQuery};
/*borschik:include:path/to/jquery-plugin.js*/
provide($);
});