I hereby claim:
- I am nathanhammond on github.
- I am nathanhammond (https://keybase.io/nathanhammond) on keybase.
- I have a public key whose fingerprint is DD11 31B1 AF9A 0A66 EC41 CBFF F147 E765 0A00 8BAB
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
This is a demonstration of a possible future Ember API for focusing outlets upon rendering. It includes an Ember patch as well as the code to use it–which can be dropped inside of your app.js
file.
An example application exists here and the RFC for the feature, Outlet Focusing, exists here.
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
positionalParams: ['one','two'] | |
}); |
/* | |
Ancestry - jquery.ancestry.js | |
As discussed in the jQuery Development Google Group. | |
Released under the MIT license. | |
Involved: Michael Geary, Diego Perini, John-David Dalton, John Resig, and Nathan Hammond | |
Compiled: Nathan Hammond | |
*/ | |
jQuery.comparePosition = function ( element, context) { |
/* | |
Serialize Subsection - jquery.subsection.js | |
Copyright (c) 2008 Nathan Hammond | |
Released under the MIT license. | |
With thanks to Michael Geary, Diego Perini, John-David Dalton, John Resig, and Garrett Smith for vetting elements of this idea. | |
Requires jQuery revision 5826 or later with the change to jQuery.fn.serializeArray() to query this.elements. | |
Requires Ancestry plugin. | |
*/ | |
/*! | |
* jQuery TextChange Plugin | |
* http://www.zurb.com/playground/jquery-text-change-custom-event | |
* | |
* Copyright 2010, ZURB | |
* Released under the MIT License | |
*/ | |
(function ($) { | |
$.event.special.textchange = { | |
setup: function (data, namespaces) { |
/* | |
To run test... | |
1. Get wsbench. Update the shebang in wsbench/wsbench if necessary. | |
> git clone git://github.com/pgriess/wsbench.git | |
> cd wsbench | |
2. Add in our test case by saving this file (wsbenchtest.js) into the wsbench directory. | |
3. Start the socket.io chat example. |
var http = require('http'); | |
var fs = require('fs'); | |
var redisio = http.createClient(80, 'redis.io'); | |
function getCommands() { | |
var commandrequest = redisio.request('GET', '/commands.json', {'Host': 'redis.io'}); | |
commandrequest.end(); | |
var commandsfile = fs.createWriteStream('commands.json'); | |
commandrequest.on('response', function (response) { |
// Load jQuery. | |
var $loader = function(callback) { | |
this.callback = callback; | |
this.check$(); | |
} | |
$loader.prototype = { | |
// Check to see if we have our own copy of jQuery. | |
check$: function(version) { | |
// Load event version. | |
// TODO: Limit to our earliest supported version of jQuery. |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>Ember Bug</title> | |
<script type="text/x-handlebars" data-template-name="president"> | |
The President of the United States is {{name}}. | |
</script> | |
</head> | |
<body> | |
<script src="http://code.jquery.com/jquery-1.7.1.js"></script> |