Skip to content

Instantly share code, notes, and snippets.

Eric Eastwood MadLittleMods

Block or report user

Report or block MadLittleMods

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View bling.js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
View browserify_for_webpack_users.markdown

browserify for webpack users

There's been a strange explosion in misinformation about browserify recently, particularly in comparisons to webpack.

Generally speaking, most of this confusion stems from how webpack is more willing to pull features into its core to ease discoverability while browserify is more likely to push features out to userland instead.

I think that longer-term, separability has more benefits from a maintenance and

@staltz
staltz / introrx.md
Last active Feb 29, 2020
The introduction to Reactive Programming you've been missing
View introrx.md
View gist:082e538784ebe07e40f9
(function () {
var _window = window;
(function () {
var window = {};
Object.defineProperty(window, 'location', {
get: function () { return _window.location; },
@glnds
glnds / less-cheatsheet.md
Last active Jan 29, 2020
Less Cheatsheet
View less-cheatsheet.md

Less Cheatsheet

less {filename}
Navigation
SPACE forward one window
b backward one window
d forward half window
@piscisaureus
piscisaureus / pr.md
Created Aug 13, 2012
Checkout github pull requests locally
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@eduardocereto
eduardocereto / cb_addEventListener.js
Created May 4, 2011
a cross-browser implementation of addEventListener/AttachEvent without external dependencies
View cb_addEventListener.js
/**
* Cross Browser helper to addEventListener.
*
* @param {HTMLElement} obj The Element to attach event to.
* @param {string} evt The event that will trigger the binded function.
* @param {function(event)} fnc The function to bind to the element.
* @return {boolean} true if it was successfuly binded.
*/
var cb_addEventListener = function(obj, evt, fnc) {
// W3C model
You can’t perform that action at this time.