I hereby claim:
- I am vasanthk on github.
- I am vasa (https://keybase.io/vasa) on keybase.
- I have a public key whose fingerprint is 0872 9F46 406A ABE5 4EBC F69A 1BA1 6FF2 9340 598D
To claim this, I am signing this object:
<html> | |
<head> | |
<script src="https://apis.google.com/js/client.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<script> | |
function auth() { | |
var config = { | |
'client_id': 'OAUTH_CLIENT_ID', | |
'scope': 'https://www.google.com/m8/feeds' | |
}; |
var app = require('http').createServer(handler); | |
var statusCode = 200; | |
app.listen(9000); | |
function handler (req, res) { | |
var data = ''; | |
if (req.method == "POST") { | |
req.on('data', function(chunk) { |
I hereby claim:
To claim this, I am signing this object:
{ | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, | |
"node": true | |
}, | |
"ecmaFeatures": { | |
"arrowFunctions": true, | |
"blockBindings": true, | |
"classes": true, |
{ | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, | |
"es6": true, | |
"node": true | |
}, | |
"ecmaFeatures": { | |
"arrowFunctions": true, | |
"binaryLiterals": true, |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');
Those suck for maintenance and they're ugly.
Dispatcher is used to broadcast payloads to registered callbacks. This is different from generic pub-sub systems in two ways: | |
1) Callbacks are not subscribed to particular events. Every payload is dispatched to every registered callback. | |
2) Callbacks can be deferred in whole or part until other callbacks have been executed. |
git fetch upstream | |
git checkout mybranch | |
git merge upstream/master | |
# if necessary, resolve conflicts and git commit | |
# ... | |
git reset --soft upstream/master | |
git commit -am 'Some cool description for a single commit' | |
git push -f |
App Life Cycles | |
- Response | |
- Animations | |
- Idle | |
- Load (XHR, Websockets, HTML imports) | |
In Chronological Order: | |
Load (~1 sec) Initial page load | |
Idle (~ 50ms) Lazy load items | |
Response (~100ms) On interaction, respond within 100ms |