Skip to content

Instantly share code, notes, and snippets.

View juanparati's full-sized avatar

Juan Lago juanparati

  • Aarhus (Denmark)
View GitHub Profile
function unicode2utf8($c)
{
$output="";
if($c < 0x80)
{
return chr($c);
}
else if($c < 0x800)
{
var swipeFunc = function() {
this._swipe_direction = ['left','right'];
this._y_diff = -1;
this._x_diff = -1;
this._x_min_length = 30;
this.touches = {
'touchstart': {'entered':false,'x':-1, 'y':-1},
'touchmove' : {'entered':false,'x':-1, 'y':-1},
'touchend' : false,
'direction' : 'undetermined'
@juanparati
juanparati / gist:e171e04e84b086a2e22f
Created August 14, 2014 09:22
getInstaceOf from the same class, so we can retrieve the var name thas contains the object
/**
* Get instance names of an object
*
* Returns instances
*/
function getInstancesOf()
{
var instances = [];
for(var v in window) {