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
.
#!/bin/bash | |
# Open iPhone Simulator on default location for XCode 4.3 if found | |
[[ -d /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app | |
# Open iPhone Simulator on default location for XCode 4.2 if found | |
[[ -d /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app/ ]] && | |
open /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app |
function nestCollection(model, attributeName, nestedCollection) { | |
//setup nested references | |
for (var i = 0; i < nestedCollection.length; i++) { | |
model.attributes[attributeName][i] = nestedCollection.at(i).attributes; | |
} | |
//create empty arrays if none | |
nestedCollection.bind('add', function (initiative) { | |
if (!model.get(attributeName)) { | |
model.attributes[attributeName] = []; |
<!doctype html> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="user-scalable=no, initial-scale=1.0"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<link rel="stylesheet" href="http://sharedfil.es/style-objajqsQWR.css"> | |
<title>example</title> | |
<body> | |
<p id="log"></p> |
// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/ | |
var metas = document.getElementsByTagName('meta'); | |
var i; | |
if (navigator.userAgent.match(/iPhone/i)) { | |
for (i=0; i<metas.length; i++) { | |
if (metas[i].name == "viewport") { | |
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0"; | |
} | |
} |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>Backbone example</title> | |
<script type="text/javascript" src="jquery.min.js"></script> | |
<script type="text/javascript" src="underscore.js"></script> | |
<script type="text/javascript" src="backbone.js"></script> |
// Written by Rachel Myers as a introduction to test-first javascript development. | |
// Inspired by and very nearly lifted from Jim Weirich's Ruby Koans, which are awesome. | |
// Replace the nulls to make the specs pass and reach javascript enlightenment. | |
describe('Strings', function () { | |
// Creating Strings | |
it('should create a new string with either single or double quotes', function() { |