Exploring tools that allow converting a JSON response automagically into an OpenAPI / Swagger spec.
{
"accounts": {
"default": {| /* bling.js */ | |
| window.$ = document.querySelector.bind(document); | |
| window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
| <?php | |
| /* * ** | |
| * | |
| * This script converts an existing MySQL database to migrations in Laravel 4. | |
| * | |
| * 1. Place this file inside app/controllers/ | |
| * | |
| * 2. In this file, edit the index() method to customize this script to your needs. | |
| * - inside $migrate->ignore(), you pass in an array of table |
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.