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
| jQuery.fn.offset = function( options ) { | |
| if ( arguments.length ) { | |
| return options === undefined ? | |
| this : | |
| this.each(function( i ) { | |
| jQuery.offset.setOffset( this, options, i ); | |
| }); | |
| } | |
| var docElem, body, win, clientTop, clientLeft, scrollTop, scrollLeft, |
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
| dave@STUDLIO /c/inetpub/apache/trash | |
| $ bower install sizzle | |
| cygwin warning: | |
| MS-DOS style path detected: C:\Users\dave\AppData\Roaming\npm/node | |
| Preferred POSIX equivalent is: /c/Users/dave/AppData/Roaming/npm/node | |
| CYGWIN environment variable option "nodosfilewarning" turns off this warning. | |
| Consult the user's guide for more details about POSIX paths: | |
| http://cygwin.com/cygwin-ug-net/using.html#using-pathnames | |
| bower cloning git://github.com/jquery/sizzle.git | |
| bower caching git://github.com/jquery/sizzle.git |
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
| <!DOCTYPE html> | |
| <head> | |
| <title>Pusher Test</title> | |
| <script src="http://js.pusher.com/1.12/pusher.min.js" type="text/javascript"></script> | |
| <script type="text/javascript"> | |
| // Enable pusher logging - don't include this in production | |
| Pusher.log = function(message) { | |
| if (window.console && window.console.log) window.console.log(message); | |
| }; |
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 | |
| basedir=`dirname "$0"` | |
| case `uname` in | |
| *CYGWIN*) basedir=`cygpath -w "$basedir"`;; | |
| esac | |
| if [ -x "$basedir/node" ]; then | |
| "$basedir/node" "$basedir/node_modules/grunt-cli/bin/grunt" "$@" | |
| ret=$? |
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
| #!/usr/bin/env node | |
| var child = require("child_process"); | |
| child.execFile("git", [ "status" ], function( error, stdout ) { | |
| console.log("==== result from child.execFile() ===="); | |
| if ( error ) { | |
| console.error("ERROR: " + error); | |
| } | |
| console.log(stdout); |
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
| // Node-like signature with single callback, returns the XHR | |
| $.xhrcb( url: String, complete: Function( err: Error, xhr: XHR, options: Object ) ): XHR; | |
| $.xhrcb( options: Object, complete: Function( err: Error, xhr: XHR, options: Object ) ): XHR; | |
| // Returns a Promise, throws an error if no Promise or shim | |
| $.xhr( options: Object ): Promise | |
| // See ticket http://bugs.jquery.com/ticket/14509 for `options` | |
| // Thoughts: |
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
| function SomeWidget( $elem ) { | |
| this.$elem = $elem; | |
| } | |
| SomeWidget.prototype = { | |
| constructor: SomeWidget, | |
| renderTo: function( target ) { | |
| $( target ).append( this.$elem.on( "click mousemove", this ) ); | |
| }, |
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
| From: John Resig [mailto:jeresig@gmail.com] | |
| Sent: Sunday, February 26, 2006 7:55 PM | |
| To: Dave Methvin | |
| Subject: Re: jQuery suggestions | |
| > JQuery is incredibly useful. I just started playing with it yesterday | |
| > and already I'm hooked. I know exactly *why* I like it so much too. | |
| > Have you ever read Paul Graham's essay "Succinctness is Power"? | |
| > http://www.paulgraham.com/power.html | |
| > Read it, and your neck will be sore afterwards. That's what happens |
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
| ( function( factory ) { | |
| if ( typeof define === "function" && define.amd ) { | |
| define( "jquery-deferred-reporter", [ "jquery" ], factory ); | |
| } else if ( typeof module === "object" && module.exports ) { | |
| module.exports = factory( require( "jquery" ) ); | |
| } else { | |
| factory( jQuery ); | |
| } |
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
| import React from 'react' | |
| import ReactDOM from 'react-dom' | |
| const Hello = ({name}) => <h1>Hello {name}!</h1> | |
| ReactDOM.render( | |
| <Hello name={"vjeux"}/>, | |
| document.body.appendChild(document.createElement("div")) | |
| ) |