I attended this event and the talk was pretty great! Based on the talk and a little poking at documentation / Stack Overflow, I was able to easily put together this cube of cubes.
A Pen by Brian Arnold on CodePen.
I attended this event and the talk was pretty great! Based on the talk and a little poking at documentation / Stack Overflow, I was able to easily put together this cube of cubes.
A Pen by Brian Arnold on CodePen.
/** | |
* MooCrash | |
* A MooTools plugin to crash IE6 | |
* v0.0.1 | |
* | |
* Licensed under MIT license, so, y'know, feel free to take it | |
* http://www.opensource.org/licenses/mit-license.php | |
* Inspired by jQuery Crash, written because @jsconf asked for it | |
* | |
* Extending Browser, since that seems to be the right place for it. |
(function () { | |
var blinktags = document.getElementsByTagName('blink'), len = blinktags.length, vis = 'hidden', i; | |
if (len > 0) { | |
setInterval(function () { | |
for (i = 0; i < len; i++) blinktags[i].style.visibility = vis; | |
vis = vis === 'visible' ? 'hidden' : 'visible'; | |
}, 500); | |
} | |
})(); |
function given(dependencies) { | |
return { | |
define: function(id, module) { | |
if (!module) { | |
// Assume the first arg is the module | |
module = id; | |
id = undefined; | |
} | |
return define(id, dependencies, module); | |
} |
COMMENTS_SECRET = 'any_old_string_you_like' |
(function(){ | |
document.write('<iframe src="http://www.yourwebsite.com/path/embed.html" width="100%" border="0" frameBorder="0" style="border:0;" id="the-embed-id"><' + '/iframe>'); | |
var the_iframe = document.getElementById('the-embed-id'), | |
offsetWidth = the_iframe.offsetWidth, newHeight = '60px'; | |
if (offsetWidth < 300) { | |
newHeight = '600px'; | |
} else if (offsetWidth < 400) { | |
newHeight = '300px'; | |
} else if (offsetWidth < 600) { |
// A means of using underscore.js to do templates with conditionals | |
// Inside of underscore's template, it returns a function that uses | |
// 'with' on a variable named obj, and you can touch into that using | |
// inline JS and <% %> wrappers | |
// A template with conditional display of last names: | |
var good = _.template("Hello: <%= name %> <% if (obj.lastname) { %> <%= lastname %> <% } %>"); | |
// A template that tries to do that, but fails: | |
var bad = _.template("Hello: <%= name %> <% if (lastname) { %> <%= lastname %> <% } %>"); |
define(function () { | |
// summary: | |
// A dojo loader plugin for loading esri modules so that | |
// they get ignored by the build system. | |
return { | |
load: function (id, require, callback) { | |
// id: String | |
// esri module id | |
// require: Function | |
// AMD require; usually a context-sensitive require bound to the module making the plugin request |
define([ | |
"dojo/_base/declare", | |
"dojo/store/JsonRest", | |
"dojo/store/util/QueryResults" | |
], function(declare, JsonRest, QueryResults){ | |
return declare(JsonRest, { | |
query: function(query, queryOptions){ | |
// Issue original query | |
var results = this.inherited(arguments); |
<snip thousands of file names> | |
Transmitting file data ......................................................... | |
................................................................................ | |
................................................................................ | |
................................................................................ | |
................................................................................ | |
................................................................................ | |
................................................................................ | |
................................................................................ | |
................................................................................ |