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 EventEmitter = require('events').EventEmitter | |
| var i; | |
| var count = 100000000; | |
| var e = new EventEmitter(); | |
| e.on('hi', function() {}); | |
| now = Date.now(); | |
| for (i = 0; i < count; i++) { | |
| e.emit('hi'); |
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 domain = require('domain'); | |
| var i, now, count = 10000000; | |
| var source = domain.Domain.toString(); | |
| now = Date.now(); | |
| for (i = 0; i < count; i++) { | |
| domain.create(); | |
| } |
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 Readable = require('stream').Readable; | |
| var i, now, count = 1000000; | |
| var source = Readable.toString().split('\n')[9]; | |
| now = Date.now(); | |
| for (i = 0; i < count; i++) { | |
| new Readable(); | |
| } |
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 https = require('https'); | |
| var tls = require('tls'); | |
| var i, now, count = 10000000; | |
| var port = 10443, host = 'localhost', options = {}; | |
| var agent = new https.Agent(); | |
| // stub function | |
| tls.connect = function() {}; | |
| now = Date.now(); |
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
| source 'https://rubygems.org' | |
| gem 'activerecord', '4.0.0.beta1', require: 'active_record' | |
| gem 'enumerize', github: 'brainspec/enumerize' | |
| gem 'sqlite3' |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <script src="http://code.jquery.com/jquery-1.10.2.js"></script> | |
| <script src="http://builds.emberjs.com/handlebars-1.0.0.js"></script> | |
| <script src="http://builds.emberjs.com/tags/v1.0.0/ember.js"></script> | |
| </head> | |
| <script type="text/x-handlebars"> |
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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
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
| document.addEventListener('mouseup', function() { | |
| var text = window.getSelection().toString(); | |
| console.log(text); | |
| }); |
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
| Ember.TEMPLATES["application"] = Ember.HTMLBars.template((function() { | |
| return { | |
| isHTMLBars: true, | |
| cachedFragment: null, | |
| build: function build(dom) { | |
| var el0 = dom.createDocumentFragment(); | |
| var el1 = dom.createElement("div"); | |
| dom.setAttribute(el1,"class","topbar"); | |
| var el2 = dom.createTextNode("\n "); | |
| dom.appendChild(el1, el2); |
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
| // 6to5 source.js -m umd | |
| (function (factory) { | |
| if (typeof define === "function" && define.amd) { | |
| define(["exports", "module"], factory); | |
| } else if (typeof exports !== "undefined" && typeof module !== "undefined") { | |
| factory(exports, module); | |
| } | |
| })(function (exports, module) { | |
| "use strict"; |