The only cross-platform browser that fits in a Gist!
One line install. Works on Linux, MacOSX and Windows.
$> npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
/** Links: | |
* - http://stackoverflow.com/questions/36368919/scrollable-image-with-pinch-to-zoom | |
* - http://blog.lum.pe/gesture-detection-in-react-native-fixing-unexpected-panning/ | |
* | |
*/ | |
import React, {Component, PropTypes} from 'react'; | |
import { Text, View, PanResponder, Image } from 'react-native'; | |
function calcDistance(x1, y1, x2, y2) { |
/** | |
* Fastest jQuery.fn.find | |
* @jsperf http://jsperf.com/jquery-find-vs-jquery-fastestfind | |
* @author RubaXa <ibnRubaXa@gmail.com> | |
* @license MIT | |
*/ | |
/* global document, jQuery */ | |
document.createElement('div').querySelectorAll && (function ($, originalFind){ |
/** | |
* Watcher leaks for jQuery | |
* RubaXa <trash@rubaxa.org> | |
* MIT Licensed. | |
* | |
* API: | |
* $.leaks.get(); | |
* $.leaks.watch(); | |
* $.leaks.unwatch(); | |
* $.leaks.remove(); |
function simpleObjInspect(oObj, key, tabLvl) | |
{ | |
key = key || ""; | |
tabLvl = tabLvl || 1; | |
var tabs = ""; | |
for(var i = 1; i < tabLvl; i++){ | |
tabs += "\t"; | |
} | |
var keyTypeStr = " (" + typeof key + ")"; | |
if (tabLvl == 1) { |
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |