View intervals.js
1 2 3 4 5 6 7 8 9
var intervals = [];
 
intervals.push(setInterval(function() {
console.log('apples');
}, 100));
 
intervals.push(setInterval(function() {
console.log('pears');
}, 100));
View insertAdjacentHTML.js
1 2 3 4 5 6 7 8 9 10
/*
* insertAdjacentHTML.js
* Cross-browser full HTMLElement.insertAdjacentHTML implementation.
*
* 2011-10-10
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
View object-watch.js
1 2 3 4 5 6 7 8 9
/*
* object.watch polyfill
*
* 2012-04-03
*
* By Eli Grey, http://eligrey.com
* Public Domain.
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
*/
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:

View mustard.js
1 2 3 4 5 6 7 8 9 10
// From: http://responsivenews.co.uk/post/18948466399/cutting-the-mustard
if('querySelector' in document && 'localStorage' in window && 'addEventListener' in window) {
// Load the enhanced app:
/*
HTML5 browsers:-
IE9+
Firefox 3.5+
Opera 9+ (and probably further back)
Safari 4+
Chrome 1+ (I think)
View insertAfter.js
1 2 3 4 5 6 7 8
function insertAfter(referenceNode, newNode) {
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);
}
 
var el = document.createElement("span");
el.innerHTML = "test";
var div = document.getElementById("foo");
insertAfter(div, el);
View interval.js
1 2 3 4 5 6 7 8 9
// http://stackoverflow.com/questions/7279567/how-do-i-pause-a-window-setinterval-in-javascript
 
function RecurringTimer(callback, delay) {
var timerId, start, remaining = delay;
 
this.pause = function() {
window.clearTimeout(timerId);
remaining -= new Date() - start;
};
View isMobile.js
1 2 3 4 5 6 7 8 9 10
var isMobile = {
Android: function() {
return navigator.userAgent.match(/Android/i);
},
BlackBerry: function() {
return navigator.userAgent.match(/BlackBerry/i);
},
iOS: function() {
return navigator.userAgent.match(/iPhone|iPad|iPod/i);
},
View socks.txt
1 2 3 4 5 6 7 8 9
From: http://www.chromium.org/developers/design-documents/network-stack/socks-proxy
 
To configure chrome to proxy traffic through the SOCKS v5 proxy server myproxy:8080, launch chrome with these two command-line flags:
 
--proxy-server="socks5://myproxy:8080"
--host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE myproxy"
 
The first thing to check when debugging is look at the Proxy tab on about:net-internals, and verify what the effective proxy settings are:
chrome://net-internals/#proxy
View config.sh
1 2 3 4 5 6 7 8 9 10
Host example.com *.example.net
User root
Host dev.example.net dev.example.net
User shared
Port 220
Host test.example.com
User root
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
Host t
Something went wrong with that request. Please try again.