This file contains hidden or 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
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
This file contains hidden or 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
#!/bin/sh | |
# Just copy and paste the lines below (all at once, it won't work line by line!) | |
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
function abort { | |
echo "$1" | |
exit 1 | |
} | |
set -e |
This file contains hidden or 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
/* | |
Confused? Start here: http://brian.io/lawnchair/ | |
This plugin takes two awesome other plugins and mashes their naughty bits together. | |
Queries are awesome. Pagination is awesome. Paginated Queries are awesome^2. | |
I take no credit for any of the heavy lifting done here, all I did was take two genius | |
things and smash them together. | |
*/ |
This file contains hidden or 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 Lawnchair = function(options, callback) { | |
// 确保Lawnchair被作为contructor调用 | |
if (!(this instanceof Lawnchair)) return new Lawnchair(options, callback); | |
// lawnchair依赖JSON | |
if (!JSON) throw 'JSON unavailable! Include http://www.json.org/json2.js to fix.'; | |
// options是可选的,但callback是必须的 | |
if (arguments.length <= 2 && arguments.length > 0) { | |
callback = (typeof arguments[0] === 'function') ? arguments[0] : arguments[1]; |