Skip to content

Instantly share code, notes, and snippets.

Joaquin Garrido JGarrido

Block or report user

Report or block JGarrido

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@JGarrido
JGarrido / $q.allComplete.js
Last active Sep 7, 2016
Here's my implementation of `Q.allSettled` for AngularJS, which I've named `allComplete`. Due to a bug in this Gist editor, I had to give this gist a .js extension file name, but this would typically go within your services.js file (depending on your project structure).
View $q.allComplete.js
angular.module('App.services', ['ngResource'])
.config( function($provide) {
$provide.decorator("$q", ["$delegate", function($delegate) {
var $q = $delegate;
$q.allComplete = function(promises) {
if(!angular.isArray(promises)) {
throw Error("$q.allComplete only accepts an array.");
}
@JGarrido
JGarrido / app.js
Last active Sep 5, 2017
Nodetube: A basic, updated version of the tutorial at http://net.tutsplus.com/tutorials/javascript-ajax/how-to-scrape-web-pages-with-node-js-and-jquery/. This gets you about halfway through Step 3 of the tutorial, and is updated to reflect the change in markup structure of youtube.com (this is parsing the 'non-authenticated' markup, which is dif…
View app.js
/**
* Module dependencies.
*/
var express = require('express')
, jsdom = require('jsdom')
, request = require('request')
, url = require('url')
, http = require('http')
, path = require('path')
You can’t perform that action at this time.