Get a VPS that offers 2 or more IP addresses.
From the WHM cPanel, find the menu item Service Configuration
, select Apache Configuration
and then click on Reserved IPs Editor
.
Related: [Why you don't need jQuery as an abstraction][2]
$
itself is a god object. Everything goes on it. The standard plugin / extension architecture that is recommended is to just bolt more methods on $
itself!
Surely this is bad. An example would be how we have both $.load
which is overloaded to do completely different things. If they were on two separate sensibly named objects $Container.load
and $EventTarget.load
. Personally I would deprecate the latter in favour of .on('load'
The animation should be it's own little modular thing, not bolted onto $
. Ajax should be it's own little modular thing, not bolted onto $
// Pretty fast - http://jsperf.com/select-vs-natives-vs-jquery | |
/* | |
By, shortcuts for getting elements. | |
*/ | |
var By = { | |
id: function (id) { return document.getElementById(id) }, | |
tag: function (tag, context) { | |
return (context || document).getElementsByTagName(tag) | |
}, | |
"class": function (klass, context) { |
// Copy and paste this into the address bar or create a bookmark with this as the location. | |
// STOP SOPA! | |
javascript:$(".content").each(function(){var a=$(this),b=a.text().replace(/\S/g,"\u2587");a.text(b)});; |
//http://www.w3.org/TR/2011/WD-page-visibility-20110602/ | |
(function () { | |
"use strict"; | |
//no need to shim if it's already there | |
if ( 'hidden' in document && 'onvisibilitychange' in document ) { | |
return; | |
} | |
//fail silently if the browser sux |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>Canvas Hexagonal Map</title> | |
<style type="text/css"> | |
canvas { | |
border:0; | |
display:block; | |
margin:0 auto; |
/* Listener Object | |
* For event registration and unregistration | |
*/ | |
var listener = (function() { | |
function listenerAdd(elm, evt, func) { | |
if( elm.addEventListener ) { | |
elm.addEventListener(evt, func, false); | |
} else if( elm.attachEvent ) { | |
elm.attachEvent('on'+evt, func); | |
} |