- Описание Promise на MDN https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise
- Библиотека Async https://caolan.github.io/async/
- Библиотека Bluebird bluebirdjs.com/docs/api-reference.html
- Библиотека RxJS 4 https://github.com/Reactive-Extensions/RxJS
- Библиотека RxJS 5+ https://github.com/Reactive-Extensions/RxJS
- Monotonic Clocks in Windows and POSIX https://www.softwariness.com/articles/monotonic-clocks-windows-and-posix/
- Как ntpd корректирует время http://doc.ntp.org/4.1.0/ntpd.htm
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
ajax: function(url) { | |
var req = this.createXMLHTTPObject(); | |
if (req) { | |
try { | |
req.open('GET', url, false); | |
req.send(''); | |
return req.responseText; | |
} catch (e) { | |
} | |
} |
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
transition: function (method, startEvent, completeEvent) { | |
var that = this | |
, complete = function (e) { | |
if (this.transitioning) { | |
if (e.type == 'show') this.reset() | |
this.transitioning = 0 | |
this.$element.trigger(completeEvent) | |
} | |
} |
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
// name: Remove To Do Planned and Done from column headings | |
// placeholder: restui_board | |
tau.mashups | |
.addDependency('tau/core/bus.reg') | |
.addModule('BusListeners', function(reg){ | |
function Listener(bus, event, func){ | |
this.bus = bus | |
this.event = event |
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 ruby -w | |
treshold, head = ARGV | |
head ||= 'HEAD' | |
Megabyte = 1000 ** 2 | |
treshold = (treshold || 0.1).to_f * Megabyte | |
big_files = {} | |
commit_number = 0 | |
commits_count = 0 |
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
// ==UserScript== | |
// @name GitHub code review helper | |
// @namespace https://github.com/victor-homyakov/ | |
// @version 0.6.0 | |
// @description Open/hide GitHub diff when clicking on diff header. Open/hide all diffs with the same extension when ctrl-clicking on diff file name. | |
// @author Victor Homyakov | |
// @copyright 2013+, Victor Homyakov | |
// @include https://github.com/*/*/commit/* | |
// @include https://github.com/*/*/pull/* | |
// @include https://github.com/*/*/compare/* |
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
/* eslint-disable no-var,no-console */ | |
// detect unused CSS selectors | |
(function() { | |
var parsedRules = parseCssRules(); | |
console.log('Parsed CSS rules:', parsedRules); | |
detectDuplicateSelectors(parsedRules); | |
var selectorsToTrack = getSelectorsToTrack(parsedRules); | |
window.selectorStats = { unused: [], added: [], removed: [] }; | |
console.log('Tracking style usage (inspect window.selectorStats for details)...'); |
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
/* | |
Setup: | |
npm i benchmark | |
npm i string-hash | |
Results on Node 8.6.0: | |
md5-hex x 411,933 ops/sec ±0.94% (84 runs sampled) | |
md5-base64 x 409,007 ops/sec ±2.13% (82 runs sampled) | |
sha1-hex x 426,509 ops/sec ±2.62% (83 runs sampled) | |
sha1-base64 x 426,735 ops/sec ±3.52% (80 runs sampled) |
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
/*global describe, it, CodeMap*/ | |
const assert = require('assert'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const vm = require('vm'); | |
function load(file) { | |
const filename = path.join(__dirname, file); | |
const code = fs.readFileSync(filename).toString(); | |
new vm.Script(code, { filename, displayErrors: true }).runInThisContext(); |
- Navigation Timing 2 https://www.w3.org/TR/navigation-timing-2/
- Navigation Timing 1 с примерами https://developer.mozilla.org/en-US/docs/Web/API/Navigation_timing_API
- Resource Timing https://www.w3.org/TR/resource-timing-1/
- Paint Timing https://www.w3.org/TR/paint-timing/
- Описание Chrome DevTools https://developers.google.com/web/tools/chrome-devtools/
- Полезные советы по DevTools https://umaar.com/dev-tips
- Lighthouse https://www.npmjs.com/package/lighthouse
OlderNewer