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
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and | |
installing your bundle as root will break this application for all non-root | |
users on this machine. | |
Fetching gem metadata from https://rubygems.org/........... | |
Fetching additional metadata from https://rubygems.org/.. | |
Resolving dependencies... | |
Using rake 10.3.2 | |
Using i18n 0.6.9 | |
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. |
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
Backbone.View.prototype.inject = function(viewOptions,options){ | |
var offcialViewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events']; | |
viewOptions = _.filter(viewOptions,function(item){ | |
return !~_.indexOf(offcialViewOptions,item) | |
}) | |
_.extend(this, _.pick(options, viewOptions)); | |
} | |
// view.inject(['modal'],{modal:modal}) demo |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
100: "Continue", | |
101: "Switching Protocols", | |
102: "Processing", | |
200: "OK", | |
201: "Created", | |
202: "Accepted", | |
203: "Non-Authoritative Information", | |
204: "No Content", | |
205: "Reset Content", | |
206: "Partial Content", |
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
// Node.js CheatSheet. | |
// Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
// Download: http://nodejs.org/download/ | |
// More: http://nodejs.org/api/all.html | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
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 oldDone = Nprogress.done; | |
Nprogress.done = function(){ | |
var setfmSrc = function(dom, url){ | |
dom.src = url; | |
}; | |
var fm = document.getElementById('triggerloading'); | |
var url = "/favicon.ico"; // ping page; | |
if(fm){ | |
setfmSrc(fm, url); | |
} else{ |
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
/******************************************************************************/ | |
/*********************************** EASING ***********************************/ | |
/******************************************************************************/ | |
(function() { | |
// based on easing equations from Robert Penner (http://www.robertpenner.com/easing) | |
var baseEasings = {}; | |
$.each( [ "Quad", "Cubic", "Quart", "Quint", "Expo" ], function( i, name ) { |
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
Vue.directive('datepicker', { | |
bind: function (el, binding, vnode, oldVnode) { | |
$(el).datepicker({ | |
onSelect: function (date) { | |
vnode.context.date = date; | |
} | |
}); | |
}, | |
update: function (el, binding, vnode, oldVnode) { | |
$(el).datepicker('setDate', binding.value); |
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
<Row gutter="30"> | |
<Col span="16" v-if="goodscm3Toggle"> | |
<Form-item label="体积(长宽高):" prop="goodscm3" vtype="int" > | |
<Row gutter="10"> | |
<Col span="7"> | |
<Input v-model="deliveryData.goodsLength" placeholder="长"></Input> | |
</Col> | |
<Col span="7"> | |
<Input v-model="deliveryData.goodsWidth" placeholder="宽"></Input> | |
</Col> |