В общем, суть вся в том, что если ты применяешь БЭМ, все эти бесконечные block block__el block__el_m, велик соблазн написать вот так:
.block {
стили блока
&__el {
стили элемента
&_m {
стили модификатора для элемента
*, | |
*::after, | |
*::before { | |
box-sizing: border-box; | |
} | |
pre { | |
appearance: none; | |
white-space: normal !important; | |
} |
const WebSocket = require('ws'); | |
const tvIP = '192.168.3.6'; | |
const ws = new WebSocket(`wss://${tvIP}:8002/api/v2/channels/samsung.remote.control`, { rejectUnauthorized: false }); | |
ws.onopen = () => console.log('opened.'); | |
ws.onclose = () => console.log('closed.'); | |
ws.onmessage = message => { | |
const data = JSON.parse(message.data); |
const dgram = require('dgram'); | |
const { Buffer } = require('buffer'); | |
// const = 'ssdp:all'; | |
const SAMSUNG_TV_URN = 'urn:samsung.com:device:RemoteControlReceiver:1'; | |
const PORT = 1900; | |
const TIMEOUT = 2000; | |
function broadcastSsdp(socket, target) { | |
const query = Buffer.from( |
const express = require('express'); | |
const util = require('util'); | |
const exec = util.promisify(require('child_process').exec); | |
const app = express(); | |
app.get('/network_health', async (req, res) => { | |
const { timeout,ㅤ} = req.query; | |
const checkCommands = [ | |
'ping -c 1 google.com', |
{ | |
"[dart]": { | |
"editor.formatOnSave": true, | |
"editor.formatOnType": true, | |
"editor.rulers": [ | |
80 | |
], | |
"editor.selectionHighlight": false, | |
"editor.suggest.snippetsPreventQuickSuggestions": false, | |
"editor.suggestSelection": "first", |
. | |
├── Brocfile.js | |
├── Makefile | |
├── dist | |
├── doc | |
│ ├── 2017-12-23\ Grid\ Definition.md | |
│ ├── 2017-12-24\ New\ Footer\ Social\ Icons.md | |
│ ├── 2017-12-25\ Layout\ Changes.md | |
│ ├── 2017-12-25\ Slider\ Declaration.md | |
│ ├── 2017-12-27\ Layout\ Changes.md |
В общем, суть вся в том, что если ты применяешь БЭМ, все эти бесконечные block block__el block__el_m, велик соблазн написать вот так:
.block {
стили блока
&__el {
стили элемента
&_m {
стили модификатора для элемента
@step: @icon-size + 12 / 1366 * 100vw; | |
@t: @icon-size * 0.35; | |
@l: -@icon-size; | |
@d: 5ms; | |
@from: 0; | |
@to: 17; | |
@break: 6; | |
.loop(@index) when(@index =< @to) { | |
@i: @index + 1; |
'use strict'; | |
const TASKS = { | |
build: 'build', | |
serve: 'serve' | |
} | |
const BUILDING = process.argv.indexOf(TASKS.build) > 0; | |
const SERVING = process.argv.indexOf(TASKS.serve) > 0; |
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |