Skip to content

Instantly share code, notes, and snippets.

const request = require('request-promise-native');
const cheerio = require('cheerio');
const scrap = async (url, selector) => {
let html;
try {
html = await request(url);
} catch (err) {
console.error(`Url no encontrada: ${url}`);
return '';
@merunga
merunga / arrays.js
Last active May 4, 2018 05:23
propuesta contenido arrays
// Extraido de
// https://github.com/wesbos/JavaScript30/blob/master/04%20-%20Array%20Cardio%20Day%201/index-FINISHED.html
/* global describe it */
// Usaremos el `assert` de node
const assert = require('assert');
// ## Unos datos que usaremos para nuestros ejemplos
// ### Inventores
@merunga
merunga / Comment.graphql
Created April 11, 2018 12:19
serverless-appsync-plugin codegen
type Comment {
_id: String!
# The comment's content.
content: String!
# The comment timestamp. This field is indexed to enable sorted pagination.
createdAt: String!
}
type Mutation {
# Comment on an event.