Skip to content

Instantly share code, notes, and snippets.

@zoobestik
zoobestik / .gitconfig
Last active August 11, 2016 21:10
common dev files
[user]
email =
name =
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
hist = log --format=\"%h %ad | %s%d [%an]\" --graph --date=short
co = checkout
ci = commit
st = status -s
br = branch
console.log({ ['foo' + 'bar']: '!!!' }) // { foobar: "!!!" }
// ^--- nice
const a = { foo: 1, bar: 2, foobar: 3 };
const delKey = (obj, name) => {
const { [name], ...result } = obj;
// ^----- Syntax Error! :'(
return result;
}
@zoobestik
zoobestik / gist:12a65ad65b1cb339d8f9
Last active August 29, 2015 14:24
«Близость к первоисточнику» Виктор Шендерович

Близость к первоисточнику

Как-то, в самый разгар застоя, Смоктуновскому предложили написать статью о Малом театре, где он в ту пору играл царя Федора Иоанновича, – статью, ни больше ни меньше, для «Правды». Ну, он и написал о Малом театре — некоторую часть того, что он к этому времени о Малом театре думал.

А думал он о нем такое, что вместо публикации, через несколько дней, Смоктуновского попросили зайти на Старую площадь, к Зимянину.

Справка для молодежи: на Старой площади располагался ЦК КПСС (сейчас там, по наследству, наводит ужас на страну Администрация президента), а Зимянин был некто, наводивший симметричный ужас при советской власти.

По собственным рассказам Иннокентия Михайловича, когда он вошел в кабинет и навстречу ему поднялся какой-то хмурый квадратный человек, артист сильно струхнул. Но это был еще не Зимянин, а его секретарь. И кабинет был еще не кабинет, а только предбанник.

@zoobestik
zoobestik / gist:8184946
Created December 30, 2013 17:14
bug extend
var def = {
l10n:
{ langdetectDataPath: '/usr/share/yandex/lang_detect_data.txt',
'default': 'ru',
langParamName: 'lang',
localeParamName: 'locale',
currencyParamName: 'currency',
rewriteRegionIfNotInLocaleCountry: false,
decl:
{ ru:
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#ZSH_THEME="robbyrussell"
ZSH_THEME="wedisagree-custom"
@zoobestik
zoobestik / .jscs.js
Last active December 19, 2015 18:29
Тест-кейс для jscs с ключем от keyword 'for'
{
"requireCurlyBraces": ["if", "else", "for", "while", "do"],
"requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return"],
"disallowQuotedKeysInObjects": true,
"disallowSpaceAfterObjectKeys": true,
"requireSpacesInsideObjectBrackets": "allButNested",
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"disallowRightStickedOperators": ["!", "?", "+", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="],
"requireLeftStickedOperators": [","],
"disallowImplicitTypeConversion": ["numeric", "boolean", "binary", "string"],
@zoobestik
zoobestik / gist:5674164
Created May 29, 2013 21:58
Example for veiw for progress bar with animation. In action: http://jsfiddle.net/zoobestik/USQfv/
<div class="progress-bar">
<div class="progress-bar__line">
<div class="progress-bar__line2"></div>
</div>
</div>
<button data-to="75">resize 75%</button>
<button data-to="20">resize 20%</button>
@zoobestik
zoobestik / YateRuntime.js
Created October 10, 2012 22:56
Yate templates rendering with nodejs
/*
* author: kb.chernenko@gmail.com
* description: yate templates rendering with nodejs
*
* yate: https://github.com/pasaran/yate
* algorithm based: https://github.com/mctep/yate-express
*/
var fs = require('fs'),
yate = require('yate');