Click to toggle contents of `code`
CODE!
| " MIT License | |
| " Copyright (c) 2017 romain Lafourcade | |
| " Permission is hereby granted, free of charge, to any person obtaining a copy | |
| " of this software and associated documentation files (the "Software"), to deal | |
| " in the Software without restriction, including without limitation the rights | |
| " to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| " copies of the Software, and to permit persons to whom the Software is | |
| " furnished to do so, subject to the following conditions: |
CODE!
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.Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html