Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| var o = $({}); | |
| $.subscribe = o.on.bind(o); | |
| $.publish = o.trigger.bind(o); |
A timeline of the last four years of detecting good old window.localStorage.
October 2009: 5059daa
I'm doing some research on how companies use GitHub Enterprise (or public GitHub) internally. If you can help out by answering a few questions, I'd greatly appreciate it.
The Mediator pattern enables communication (mediation) between views using a mediator object.In the latest version of Backbone, the Backbone object itself can be used as a mediator without the need of a seperate helper.
In the following example, triggerSomething in our ToolbarView uses the global event-bus on the Backbone object to broadcast an application wide event somethingHappened with data.
// First view
var ToolbarView = Backbone.View.extend({
className: ".toolbar",
events: {
"click .button": "triggerSomething"Re: On layout & web performance by Kelly Norton
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>#lazyweb Is there any documentation about which jQuery functions/effects trigger layout? re: kellegous.com/j/2013/01/26/l…
— Dave Rupert (@davatron5000) January 28, 2013
getWidthOrHeight() used in jQuery.fn.width/height
clientLeft
| (function( window ){ | |
| window.watchResize = function( callback ){ | |
| var resizing; | |
| callback.size = 0; | |
| function done() | |
| { | |
| var curr_size = window.innerWidth; | |
| clearTimeout( resizing ); | |
| resizing = null; | |
| // only run on a true resize |
Couldn't find the text of this for a while...