This file contains hidden or 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
| { | |
| "always_show_minimap_viewport": true, | |
| "auto_complete": true, | |
| "bold_folder_labels": true, | |
| "color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
| "default_line_ending": "unix", | |
| "ensure_newline_at_eof_on_save": true, | |
| "fallback_encoding": "Cyrillic (Windows 1251)", | |
| "file_exclude_patterns": | |
| [ |
This file contains hidden or 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
| // inherit.js | |
| var inherit = function(parent, child) { | |
| var _ = function() {}; | |
| _.prototype = parent.prototype; | |
| child.prototype = new _(); | |
| child.prototype.constructor = child; | |
| }; | |
| // inherit-es5.js |
This file contains hidden or 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(global) { | |
| 'use strict'; | |
| /* | |
| * Constructor. | |
| * | |
| * @param {Mixed} element The jquery object or selector. |
This file contains hidden or 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
| var timing = window.performance.timing, | |
| metrics = { | |
| dns: timing.domainLookupEnd - timing.domainLookupStart, | |
| tcp: timing.connectEnd - timing.connectStart, | |
| request: timing.responseStart - timing.requestStart, | |
| response: timing.responseEnd - timing.responseStart, | |
| paint: timing.domContentLoadedEventEnd - timing.domLoading, | |
| dom: timing.domComplete - timing.domLoading, | |
| total: timing.loadEventEnd - timing.navigationStart | |
| }; |
This file contains hidden or 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
| /* Old */ | |
| .classname { | |
| ... | |
| margin-top: 20px; | |
| } | |
| .classname:first-child { | |
| margin-top: 0; | |
| } |
This file contains hidden or 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
| /** | |
| * Поиск дублированных стилей | |
| * | |
| * @param {Mixed} collection Коллекция | |
| */ | |
| function duplicates(collection) { | |
| var maps = [], path = '', key = 0; | |
| if (!Array.isArray(collection)) { | |
| collection = [].slice.apply(collection); |
This file contains hidden or 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
| // Modified prototype object | |
| Object.prototype.x = 'test'; | |
| // Test | |
| var http = new XMLHttpRequest(); | |
| http.open('GET', '/test.json', true); | |
| http.onreadystatechange = function(event) { | |
| if (http.readyState == 4) { | |
| try { | |
| var json = JSON.parse(http.responseText); |
This file contains hidden or 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
| var ws = new WebSocket('ws://echo.websocket.org'); | |
| ws.addEventListener('open', function(e) { | |
| console.log('CONNECTED', e); | |
| }); | |
| ws.addEventListener('message', function(e) { | |
| console.log('RESPONSE', e); | |
| }); |
This file contains hidden or 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
| var arr = [1, 2, 3, 4, 5]; | |
| const secondsInDay = 24 * 60 * 60; | |
| var x = 1; | |
| function getTotal(subtotal) { | |
| var beforeTax = subtotal + 9.99; | |
| return beforeTax + (beforeTax * 0.13); | |
| } | |
| setTimout(function() {}, 200); |
This file contains hidden or 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
| var sha1 = require('sha1'); | |
| function WebpackSortingFix() {} | |
| WebpackSortingFix.prototype.apply = function(compiler) { | |
| compiler.plugin('compilation', function(compilation) { | |
| compilation.plugin('optimize-modules', function(modules) { | |
| for (var index in modules) { | |
| var module = modules[index]; |
OlderNewer