Skip to content

Instantly share code, notes, and snippets.

View ergoli's full-sized avatar

李延伟 ergoli

  • 快速开发平台、表单、工作流
  • 无锡、北京
View GitHub Profile
@ergoli
ergoli / uninstall_homebrew.sh
Created February 15, 2017 02:57 — forked from mxcl/uninstall_homebrew.sh
Uninstall Homebrew
#!/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
@ergoli
ergoli / uninstall_homebrew.sh
Created February 15, 2017 02:57 — forked from mxcl/uninstall_homebrew.sh
Uninstall Homebrew
#!/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
/*
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.
*/
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];