Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
<!doctype html> | |
<html> | |
<head> | |
<!-- Run in full-screen mode. --> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<!-- Make the status bar black with white text. --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
function Y(le) { | |
return (function (f) { | |
return f(f); | |
}(function (f) { | |
return le(function (x) { | |
return f(f)(x); | |
}); | |
})); | |
} |
" copy all this into a vim buffer, save it, then... | |
" source the file by typing :so % | |
" Now the vim buffer acts like a specialized application for mastering vim | |
" There are two queues, Study and Known. Depending how confident you feel | |
" about the item you are currently learning, you can move it down several | |
" positions, all the way to the end of the Study queue, or to the Known | |
" queue. | |
" type ,, (that's comma comma) |
var https = require('https'), | |
user = process.argv[2], | |
opts = parseOpts(process.argv.slice(3)) | |
request('/users/' + user, function (res) { | |
if (!res.public_repos) { | |
console.log(res.message) | |
return | |
} | |
var pages = Math.ceil(res.public_repos / 100), |
var https = require('https'), | |
user = process.argv[2], | |
opts = parseOpts(process.argv.slice(3)) | |
request('/users/' + user, function (res) { | |
if (!res.public_repos) { | |
console.log(res.message) | |
return | |
} | |
var pages = Math.ceil(res.public_repos / 100), |
Function.prototype.bind = function (context) { | |
if (typeof this !== 'function') { | |
throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable"); | |
} | |
var fn = this, // the function to bind | |
slice = Array.prototype.slice // cache slice method | |
args = slice.call(arguments, 1), // get the array of addtional arguments (to be curried) | |
noop = function () {}, // the intermediate function to serve as a prototype chain connector | |
// (assuming we don't have Object.create() here) | |
bound = function () { |
Yet another framework syndrome
Name | Date | URL | Stars |
---|---|---|---|
Jake | April 2010 | https://github.com/mde/jake | 848 |
Grunt | March 2012 | http://gruntjs.com/ | 7459 |
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.