This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const util = require('util'); | |
const request = require('request-promise'); | |
const cheerio = require('cheerio'); | |
const imageDataURI = require('image-data-uri') | |
const _ = require('lodash'); | |
function getImgUris(urls) { | |
return Promise.all(urls.map(imageDataURI.encodeFromURL)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function compare(bytes32 a, bytes32 b) | |
returns (bool _equal) | |
{ | |
_equal = true; | |
for (uint256 i = 0; i < a.length; i++) | |
{ | |
if (a[i] != b[i]) return false; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
// node deps | |
const stream = require('stream'); | |
// npm deps | |
const kafka = require('kafka-node'); | |
const colors = require('colors/safe'); |