- Вступительная статья на MDN, полезна как набор ссылок на другие статьи.
- Статьи от Rachel Andrew на MDN.
- Собрал примеры использования Grid на CodePen.


| # | |
| # Ubuntu Node.js Dockerfile | |
| # | |
| # https://github.com/dockerfile/ubuntu/blob/master/Dockerfile | |
| # https://docs.docker.com/examples/nodejs_web_app/ | |
| # | |
| # Pull base image. | |
| FROM ubuntu:14.04 |
| (function () { | |
| 'use strict'; | |
| let user = {}; | |
| let proxy = new Proxy(user, { | |
| get(target, prop) { | |
| console.log(`Чтение ${prop}`); | |
| return target[prop]; | |
| }, |
| (function () { | |
| 'use strict'; | |
| let map = new Map(); | |
| map.set('1', 'str1'); // key: string | |
| map.set(1, 'num1'); // key: number | |
| map.set(true, 'bool1'); // key: bool | |
| // in ordinary objects that would be the same, |
| (function () { | |
| 'use strict'; | |
| let range = { | |
| from: 1, | |
| to: 5 | |
| } | |
| // make object range iterable | |
| range[Symbol.iterator] = function() { |
| // send to current request socket client | |
| socket.emit('message', "this is a test"); | |
| // sending to all clients, include sender | |
| io.sockets.emit('message', "this is a test"); | |
| // sending to all clients except sender | |
| socket.broadcast.emit('message', "this is a test"); | |
| // sending to all clients in 'game' room(channel) except sender |
| # on OS X file must be named .bash_profile | |
| # real clear screen, not just add new line http://superuser.com/questions/576410/how-can-i-partially-clear-my-terminal-scrollback | |
| alias cls="printf '\e]50;ClearScrollback\a'" |
| <html> | |
| <head> | |
| <title></title> | |
| </head> | |
| <body> | |
| Hi | |
| <script> | |
| var link = document.createElement('link') | |
| link.setAttribute('rel', 'stylesheet') | |
| link.setAttribute('href', require('path').join(__dirname, 'css', 'app.css')) |
| /* | |
| > for(var i = 0; i < 100000; i++ ) { | |
| db.sample.insert({"value": Math.random(1000) + 1, "date": new Date() }); | |
| } | |
| > db.sample.findOne() | |
| { | |
| "_id" : ObjectId("5560cd3bf32e638da3683b38"), | |
| "value" : 1.3218692857772112, | |
| "tag" : "pressure" |