Skip to content

Instantly share code, notes, and snippets.

View rlemon's full-sized avatar
🍋
Hanging around.

Robert Lemon rlemon

🍋
Hanging around.
  • Dryer Moisture Systems Inc.
  • Kitchener, Ontario. Canada.
View GitHub Profile
@rlemon
rlemon / gist:4061754
Created November 12, 2012 20:43 — forked from ralt/gist:4061749
My Library when IE8 won't be supported anymore
NodeList.prototype.forEach = HTMLCollection.prototype.forEach = Array.prototype.forEach;
NodeList.prototype.map = HTMLCollection.prototype.map = Array.prototype.map;
NodeList.prototype.filter = HTMLCollection.prototype.filter = Array.prototype.filter;
NodeList.prototype.reduce = HTMLCollection.prototype.reduce = Array.prototype.reduce;
NodeList.prototype.every = HTMLCollection.prototype.every = Array.prototype.every;
NodeList.prototype.some = HTMLCollection.prototype.some = Array.prototype.some;
var By = {
id: function (id) { return document.getElementById(id) },
tag: function (tag, context) {
return (context || document).getElementsByTagName(tag)
@rlemon
rlemon / gist:3090947
Created July 11, 2012 14:58 — forked from Zirak/gist:3086939
xhr for dummies

So, you want to send a motherfucking XMLHttpRequest (XHR, or commonly and falsly known as AJAX.) Too bad, just ran out of motherfucking XMLHttpRequests; but I still have one regular. XHR is not magic. It does not autofuckinmagically send things the way you want them do be sent. It does not do the thinking for you. It just sends an Http Request.

You get a hold on such a prime beast like this:

@rlemon
rlemon / jQuery.md
Created January 19, 2012 18:37 — forked from Raynos/jQuery.md
Why you don't need jQuery

Why the jQuery Abstraction isn't needed.

(One needs some form of browser normalization so that modern features works, no-one is doubting that).

Abstractions that aren't needed

Selectors

QSA works (shim=sizzle). Besides selectors are generally bad practice. Favour node traversal, gEBI, gEBTN and gEBCN. (shim=domShim)