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
<?php | |
/** | |
* Class Chainable | |
* Wrapper for convenient chaining methods | |
* | |
* @author Stefano Azzolini <[email protected]> | |
*/ | |
class Chainable { | |
private $instance = null; |
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
<?php | |
/** | |
* Class Chainable | |
* Wrapper for convenient chaining methods | |
* | |
* @author Stefano Azzolini <[email protected]> | |
*/ | |
class Chainable { | |
private $instance = null; |
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
<?php | |
/** | |
* cURL Object Oriented API | |
* @author Stefano Azzolini <[email protected]> | |
*/ | |
class cURL { | |
/** | |
* The cURL resource descriptor | |
* @var Resource |
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
<?php | |
/** | |
* Event class | |
* A module class for handling events | |
* | |
* @author Stefano Azzolini <[email protected]> | |
*/ | |
class Events { | |
/** |
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
<?php | |
set_error_handler(function(){ echo "INTERNAL\n"; }); | |
function chain_error_handler($new_handler){ | |
$old_handler = set_error_handler(function() use (&$old_handler,$new_handler){ | |
call_user_func_array($new_handler,func_get_args()); | |
call_user_func_array($old_handler,func_get_args()); | |
}); |
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
var point, pointStartX, pointStartY, deltaX, deltaY; | |
var scroller = new iScroll('scrollerId', { | |
vScroll: false, | |
vScrollbar: false, | |
hScrollbar: false, | |
snap: 'li', | |
momentum: false, | |
onBeforeScrollStart: function(e) { | |
point = e.touches[0]; | |
pointStartX = point.pageX; |
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
// jQuery Headers support for $.ajax | |
$.ajax({ | |
beforeSend: function(xhrObj){ | |
xhrObj.setRequestHeader("Content-Type","application/json"); | |
xhrObj.setRequestHeader("Accept","application/json"); | |
} | |
type: "POST", | |
url: "/article", | |
processData: 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
/* | |
I wasn't happy with PhoneGap's Storage API and made it cleaner (in my eyes anyway) | |
Example: | |
db.query("someTable", ['id', 'column1', 'column2'], false, function(tx, results){ .. }); | |
db.query("someTable", ['*'], {'column1':'val', 'column2':'val'}, function(tx, results){ .. }); | |
db.save("someTable", IterableObject, function(){ ... }); | |
Doing more testing and validation later, but getting it out there now. :) | |
*/ |
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
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |
OlderNewer