A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| <html lang="ru"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Document</title> | |
| <script src="mozgoboj-map.js"></script> | |
| <style> | |
| #google-map { | |
| height: 500px; |
| 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'); |
| 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, ['найдена', 'найдено', 'найдены']); |
| 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)) { |
| #!/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" |
| <?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' ) ); |
| '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 [ |
| .font { | |
| font-family: -apple-system, | |
| BlinkMacSystemFont, | |
| Segoe UI, | |
| Roboto, | |
| Oxygen, | |
| Ubuntu, | |
| Cantarell, | |
| Fira Sans, | |
| Droid Sans, |
| 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', |