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 isPrimitive = function(val) { | |
| return val !== function() { return this; }.call(val); | |
| }; |
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 stringify = function(obj, prop) { | |
| var placeholder = '____PLACEHOLDER____'; | |
| var fns = []; | |
| var json = JSON.stringify(obj, function(key, value) { | |
| if (typeof value === 'function') { | |
| fns.push(value); | |
| return placeholder; | |
| } | |
| return value; | |
| }, 2); |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.
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
| JSWEEKLY BINGO | |
| +-------------------------------+-------------------------------+-------------------------------+ | |
| | An atricle from someone who | | | | |
| | just figured out | Baby's first functional | How to do this one very | | |
| | prototype-based OO and thinks | programming | specific thing in Node.js | | |
| | everyone else needs telling | | | | |
| +-------------------------------+-------------------------------+-------------------------------+ | |
| | | | | | |
| | A new jQuery release | A job in San Francisco | An introduction to an MVC | | |
| | | | framework | |
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
| define('mod/bbsync', [ | |
| 'underscore' | |
| , 'mod/ajax' | |
| ], function(_, Ajax) { | |
| function sync(method, model, options) { | |
| var url = model.url, data | |
| url = _.isFunction(url) ? model.url() : url | |
| data = method === 'create' || method === 'update' | |
| ? model.toJSON() : {} |
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
| // jQuery - failures persist along the chain | |
| $.Deferred(function(d) { d.reject() }) | |
| .then(function() { console.log("Success handler 1") }, function() { console.log("Fail handler 1") }) | |
| .then(function() { console.log("Success handler 2") }, function() { console.log("Fail handler 2") }); | |
| // Output: | |
| // Fail handler 1 | |
| // Fail handler 2 | |
| // ------------------------------------------------------------------------------------------------------ |
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
| 4th & Mayor - FourSqaure client | |
| Add to Calendar - support for ICS files attached to emails | |
| Amazon Kindle | |
| Amazon Mobile - can't live without this as a Seattelite | |
| AppoinTile - more detailed upcoming appointments/meetings tile | |
| Baconit - reddit client | |
| Battery Level for WP8 - let's you see detailed battery status from lock screen, home screen, etc. | |
| CrashPlan - so I can check my cloud backups | |
| Dictionary.com - to settle arguments | |
| Engadget - tech news |
Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh
Easily checkout local copies of pull requests from remotes:
git pr 4- creates local branchpr/4from the githubupstream(if it exists) ororiginremote and checks it outgit pr 4 someremote- creates local branchpr/4fromsomeremoteremote and checks it out







