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
| 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) |
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
| define(['some', 'dep'], function(some, dep) { | |
| 'use strict'; | |
| some.code = dep(); | |
| }); |
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
| define(function () { | |
| function getAllPaths() { | |
| return [{ | |
| path: "", | |
| url: "ui/notifications", | |
| callback: function (notifications) { | |
| notifications.init() | |
| } | |
| }, { | |
| path: "option=com_community&view=profile", |
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
| var hidden; | |
| module.exports = { | |
| public: function() { | |
| return hidden; | |
| } | |
| }; |
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
| var lib = require('./lib'), | |
| lib2 = require('./lib2'); | |
| lib2.f(); | |
| console.log(lib.a); // 2 |
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/bash | |
| ## Because the apt-get's version is way too old | |
| sudo apt-get install g++ make git-core | |
| git clone https://github.com/joyent/node | |
| cd node/ | |
| git checkout v0.8.16 | |
| ./configure | |
| make |
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
| // ==UserScript== | |
| // @name rlInput box | |
| // @author Robert Lemon | |
| // @version 0.1 | |
| // @namespace http://rlemon.com | |
| // @description Produces a small input area for you to execute Javascript on the page. Saves scripts in LocalStorage and executes on page load. | |
| // @include * | |
| // ==/UserScript== | |
| (function () { |
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
| //ths fnctn tks sntnc nd trns t t awsm | |
| //md fr jvscrpt rm | |
| // http://chat.stackoverflow.com/transcript/message/7491494#7491494 | |
| var mk_awsm = function(sntnc) { | |
| return sntnc.split(' ').map(function(wrd) { | |
| return 1 >= wrd.length ? | |
| wrd : | |
| 2 == wrd.length ? | |
| wrd[0] : | |
| /:.*(.)/.test(wrd) ? |
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 delegate(evt, parent, selector, fn) { | |
| parent.addEventListener(evt, function(e) { | |
| var elt = function find(el) { | |
| if (el.matchesSelector(selector)) { | |
| return el; | |
| } | |
| else { | |
| if (el.parentNode !== parent) { | |
| return find(el.parentNode); | |
| } |
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/bash | |
| branch=$1 | |
| shift | |
| git checkout $(git branch -a | grep $branch | head -n1) $@ |