Skip to content

Instantly share code, notes, and snippets.

View igorvieira's full-sized avatar
🏠
Working from home

Igor Vieira igorvieira

🏠
Working from home
View GitHub Profile
@andrei-cacio
andrei-cacio / react-native-setup-linux.md
Last active June 22, 2018 21:22
React native setup on Ubuntu/Linux

Guide for installing React Native on Linux (ubuntu 14.04)

Step 1: Install JDK 7

sudo apt-get install openjdk-7-jdk

Step 2: Download the Android SDK

@bergus
bergus / gist:1387854
Created November 23, 2011 04:01 — forked from lsauer/gist:1305056
Correct easiest way to find duplicate values in a JavaScript array - Native unique function implementation
/*
* I saw this thread: http://stackoverflow.com/questions/840781/easiest-way-to-find-duplicate-values-in-a-javascript-array
* 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]); }