CTRL + R
- Load time #1: 8.81s (8.9s)
- Load time #2: 9.59s (9.63s)
- Load time #3: 9.88s (9.98s)
- Load time #4: 9.79s (9.89s)
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
| socket = io.connect('http://localhost:3000'); | |
| socket.on('connect', function() { | |
| console.log("Connected to the server!"); | |
| socket.emit('command', 'someVar = 5'); | |
| socket.on('result', function(result) { | |
| console.log("Received result:", result); | |
| }); | |
| }); |
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
| # Make Vagrant faster! | |
| config.vm.network :hostonly, "33.33.33.10" | |
| config.vm.share_folder("v-root", "/vagrant", ".", :nfs => true) |
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
| @import '../variables.sass' | |
| #widgets | |
| .flow | |
| background-color: #ddd | |
| max-width: 1024px | |
| margin-bottom: 1em | |
| article.container | |
| background-color: white |
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(Console) { | |
| Console.COUNTRY_CODES = { | |
| 'US': 'United States', | |
| 'EN': 'United Kingdom' | |
| } | |
| })(this.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
| parseRoute: (route) -> | |
| next = do -> | |
| regex = /([^/]*[^/])/g | |
| return -> ((arg) -> arg).apply(this, regex.exec(route)?.slice(1)) |
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
| $rows = $('#orders-history tbody tr'); | |
| // Sum the cost of all orders placed. | |
| costTotal = [].reduce.call($('td:nth-child(7)', $rows).map(function(i, el) { return Number(el.innerHTML.replace(/[^0-9\.]+/g, "")); }), function(sum, current) { return sum + current; }) | |
| // Average audio file duration | |
| avgDuration = costTotal / $rows.length; | |
| console.log("Total cost: $" + costTotal); | |
| console.log("Average call duration: " + avgDuration + "m"); |
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
| dump = require('utils').dump | |
| entries = [] | |
| casper = require('casper').create { | |
| verbose: true | |
| logLevel: 'debug' | |
| } | |
| casper.start 'http://www.yahoo.com', -> | |
| @fill 'form', p: 'van pham tapjoy' |
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
| module.exports.render = function renderFn(url) { | |
| var bodyHTML; | |
| if (ExecutionEnvironment.canUseDOM) { | |
| Router.run(Routes, Router.HistoryLocation, (Handler, state) => { | |
| bodyHTML = React.render(<Handler params={state.params}/>, document.body); | |
| }); | |
| } else { | |
| Router.run(Routes, url, (Handler, state) => { | |
| var promises = state.routes | |
| .filter(route => route.handler.fetchData) |
I hereby claim:
- I am dsimmons on github.
- I am simmons_dan (https://keybase.io/simmons_dan) on keybase.
- I have a public key ASBdSLHj1UQnXwnJApiDmBzRjCJTgexiWXIufbgDd1MT9wo
To claim this, I am signing this object: