This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. Установить xkbswitch | |
git clone [email protected]:myshov/xkbswitch-macosx.git ~/.vim/plugin/xkbswitch-macosx | |
ln -s ~/.vim/plugin/xkbswitch-macosx/bin/xkbswitch /usr/local/bin/xkbswitch | |
# 2. Установить библиотеку-обёртку | |
git clone [email protected]:myshov/libxkbswitch-macosx.git ~/.vim/plugin/libxkbswitch-macosx | |
ln -s ~/.vim/plugin/libxkbswitch-macosx/bin/libxkbswitch.dylib /usr/local/lib/libxkbswitch.dylib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('iframeLoader.js'); | |
var thisScript = document.getElementById('artdocWidget'); | |
var parent = thisScript.parentElement; | |
parent.insertBefore(iframe, thisScript.nextSibling); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
block('select').mod('type', 'suggest')( | |
elem('menu').def()( node => { | |
return [ | |
node._optionIds.length > 10 ? applyCtx({ | |
elem: 'header', | |
content: { | |
block: 'input', | |
mods: { | |
type: 'suggest', | |
width: 'available', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.font { | |
font-family: -apple-system, | |
BlinkMacSystemFont, | |
Segoe UI, | |
Roboto, | |
Oxygen, | |
Ubuntu, | |
Cantarell, | |
Fira Sans, | |
Droid Sans, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var EOL = require('os').EOL; | |
module.exports = function(entity) { | |
var elemPart = entity.elem ? ".elem(" + entity.elem + ")" : '', | |
modVal = entity.modVal || '', | |
modPart = entity.modName ? ".mod(" + entity.modName + " " + modVal + ")" : ''; | |
return [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
switch ($modx->event->name) { | |
case "msOnChangeOrderStatus": | |
// API сервиса смс-рассылок | |
$url = $modx->getOption("mirSMS__url"); | |
$source = $modx->getOption("mirSMS__source"); | |
$login = $modx->getOption("mirSMS__login"); | |
$password = $modx->getOption("mirSMS__password"); | |
$orderObject = $modx->getObject("msOrder", $order->get( 'id' ) ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` if a specified file was changed | |
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && eval "$2" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.log('🤙'); | |
myBrowser = function (config) { | |
config = config || {}; | |
// if (config.length != 0 && config.openTo != undefined) { | |
// if (!/^\//.test(config.openTo)) { | |
// config.openTo = '/' + config.openTo; | |
// } | |
// if (!/$\//.test(config.openTo)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function declOfNum(number, titles) { | |
cases = [2, 0, 1, 1, 1, 2]; | |
return titles[ (number%100>4 && number%100<20)? 2 : cases[(number%10<5)?number%10:5] ]; | |
} | |
use: | |
declOfNum(count, ['найдена', 'найдено', 'найдены']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const gulp = require('gulp'); | |
const Builder = require('gulp-bem-bundle-builder'); | |
const bundler = require('gulp-bem-bundler-fs'); | |
const nodemon = require('gulp-nodemon'); | |
const merge = require('merge2'); | |
const debug = require('gulp-debug'); | |
const babel = require('gulp-babel'); | |
const uglify = require('gulp-uglify'); | |
const gulpif = require('gulp-if'); | |
const concat = require('gulp-concat'); |