prod/live
prod/master -> beta server
dev/uat -> uat server
dev/master -> dev server
dev/3000
dev/3001
dev/3002
dev/...
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
[deoptimize context: 1d440be414b1] | |
[disabled optimization for test, reason: bad value context for arguments value] | |
Function test(1, 2) is not optimized |
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 node --trace_opt --trace_deopt --allow-natives-syntax | |
var optimized = require('optimized'); | |
function test () { | |
var ai = 0, al = arguments.length, args = al && new Array(al) || []; | |
if (al) for(; ai < al; ai++) args[ai] = arguments[ai]; | |
return args; | |
} |
Simply jquery code for drawing boxes on an image that store their coordinates into hidden inputs for form submit.
A Pen by Jarvis Badgley on CodePen.
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
owen1: what is the reason that almost everything in node is async? | |
myndzi: async because that's the point of having a single threaded event loop system | |
owen1: so since node just uses javascript, even if ryan wanted to make it sync, it would be impossible? | |
myndzi: it's possible to make synchronous functions in node, but it would pretty much defeat the purpose | |
myndzi: it's kind of like asking "why aren't you using asparagus in this apple pie?" | |
myndzi: it's not like you can't bake an asparagus pie, it's more like why would you want to? :P |
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
# This is an upstart (http://upstart.ubuntu.com/) script | |
# to run the node.js server on system boot and make it | |
# manageable with commands such as | |
# 'start node-app' and 'stop node-app' | |
# | |
# This script is to be placed in /etc/init to work with upstart. | |
# | |
# Internally the 'initctl' command is used to manage: | |
# initctl help | |
# initctl status node-app |
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
sudo su vagrant -c 'curl https://raw.githubusercontent.com/creationix/nvm/v0.23.3/install.sh | bash' | |
sudo su vagrant -c '. ~vagrant/.nvm/nvm.sh;nvm install v0.10' | |
sudo su vagrant -c '. ~vagrant/.nvm/nvm.sh;nvm use v0.10' | |
sudo su vagrant -c '. ~vagrant/.nvm/nvm.sh;nvm alias default v0.10' |
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
function makeSequence(test, closures) { | |
return function () { | |
if (!closures.length) { | |
test.ok(false, 'Sequence was invoked too many times.'); | |
throw new Error('Sequence was invoked too many times.'); | |
} | |
test.ok(true, 'Sequence stepped'); | |
return closures.shift().apply(this, arguments); | |
}; | |
} |
Say you have a process that is connected to two or more different IRC servers running on the same network, and you want to aggrigate events on both servers into a single stream.
Due to latency within the network, events may arrive from both servers in different order and at different times. The events look identical in how they arrive, and may be identical to simmilar events occuring at another time (eg, a user joins, parts and re-joins, producing two identical join events).
How do you reconcile the streams?
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
<Kindari> "JAWS: The Javascript + AWS Stack – A monstrously scalable, server-free, web application boilerplate using bleeding-edge AWS services..." | |
<Kindari> "server-free" !? | |
<Kindari> wtf | |
<Kindari> thats not how this works | |
<Kindari> thats not how any of this works! |