Skip to content

Instantly share code, notes, and snippets.

Working from home

Igor Vieira IgorVieira

Working from home
Block or report user

Report or block IgorVieira

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
IgorVieira / gist:5c1041fcff865dd54f48ab9924644596
Created Jun 7, 2018 — forked from bergus/gist:1387854
Correct easiest way to find duplicate values in a JavaScript array - Native unique function implementation
View gist:5c1041fcff865dd54f48ab9924644596
* I saw this thread:
* The solutions from gist:1305056 were elegant, but wrong. So here's mine:
Array.prototype.unique = function(test) {
/* returns a new, sorted Array without duplicates */
if (!Array.isArray(this))
throw new TypeError("Array.prototype.unique must be called on an Array");
return this.slice(0).sort().filter( typeof test == "function"
? function(v, i, a) { return !i || !test(v, a[i-1]); }
IgorVieira / topkeywords.js
Created Oct 5, 2016 — forked from elliotbonneville/topkeywords.js
Find top keywords associated with a Google search with this Node.js application.
View topkeywords.js
var request = require("request"),
cheerio = require("cheerio"),
url = "",
corpus = {},
totalResults = 0,
resultsDownloaded = 0;
function callback () {
IgorVieira /
Created Nov 22, 2015 — forked from staltz/
The introduction to Reactive Programming you've been missing
You can’t perform that action at this time.