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
.
if (typeof window.localStorage == 'undefined' || typeof window.sessionStorage == 'undefined') (function () { | |
var Storage = function (type) { | |
function createCookie(name, value, days) { | |
var date, expires; | |
if (days) { | |
date = new Date(); | |
date.setTime(date.getTime()+(days*24*60*60*1000)); | |
expires = "; expires="+date.toGMTString(); |
require 'minitest/mock' | |
require 'minitest/unit' | |
require 'date' | |
MiniTest::Unit.autorun | |
class TestMailPurge < MiniTest::Unit::TestCase | |
class MailPurge | |
def initialize(imap) | |
@imap = imap |
// I mean, seriously, localStorage is supported even by your mum. How about instead of | |
// casing the feature out, you give users in-memory (stale) storage instead? | |
// If they close your application, they deserve to lose data anyway. | |
// if (!('localStorage' in window)) { | |
if (!Modernizr.localstorage) { | |
window.localStorage = { | |
_data : {}, | |
setItem : function(id, val) { return this._data[id] = String(val); }, | |
getItem : function(id) { return this._data.hasOwnProperty(id) ? this._data[id] : undefined; }, |
Project here: | |
https://github.com/jordansissel/ruby-cabin | |
% ruby examples/sample.rb | |
I, [2011-10-11T01:45:04.011360 #1441] INFO -- : {"timestamp":"2011-10-11T01:45:04.010614-0700","program":"sample program","foo":"Hello","example":100,"message":"bar bar bar!","level":"info"} | |
I, [2011-10-11T01:45:05.173034 #1441] INFO -- : {"timestamp":"2011-10-11T01:45:05.172846-0700","program":"sample program","foo":"Hello","example":100,"message":"Timing bar","duration":1.162167376} | |
I, [2011-10-11T01:45:05.173392 #1441] INFO -- : {"timestamp":"2011-10-11T01:45:05.173322-0700","program":"sample program","foo":"Hello","example":100,"message":"bar bar bar!","level":"info"} | |
I, [2011-10-11T01:45:05.740390 #1441] INFO -- : {"timestamp":"2011-10-11T01:45:05.740275-0700","program":"sample program","foo":"Hello","example":100,"message":"Another bar timer","duration":0.566953405} | |
I, [2011-10-11T01:45:05.740577 #1441] INFO -- : {"timestamp":"2011-10-11T01:45:05.740530-0700","program":"sample program","message":"All done.","le |
// | |
// Runs a folder of tests or a single test, using QUnit and outputs a JUnit xml file ready for sweet integration with your CI server. | |
// | |
// @usage | |
// DISPLAY=:0 phantomjs qunit-runner.js --qunit qunit.js --tests tests-foler/ --package package.json --junit qunit-results.xml | |
// | |
// package.json is a common JS package file which contains a list of files that need to be loaded before the tests are run. In this instance | |
// the package.json lists the files for a JS SDK, that gets loaded and then the tests test the SDK. | |
// | |
// Designed to run via PhantomJS. |
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.