Step 1
Get a VPS that offers 2 or more IP addresses.
Step 2
From the WHM cPanel, find the menu item Service Configuration
, select Apache Configuration
and then click on Reserved IPs Editor
.
ּ_בּ | |
בּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ | |
תּ_תּ | |
٩(×̯×)۶ | |
٩(̾●̮̮̃̾•̃̾)۶ |
# Basic text search with relevancy for MongoDB. | |
# See http://blog.tty.nl/2010/02/08/simple-ranked-text-search-for-mongodb/ | |
# Copythingie 2010 - Ward Bekker - ward@tty.nl | |
#create (or empty) a docs collection | |
doc_col = MongoMapper.connection.db('example_db').collection('docs') | |
doc_col.remove({}) | |
#add some sample data | |
doc_col.insert({ "txt" => "it is what it is"}) |
// Kosso imageAsCropped | |
// added to TiBlob.m | |
// requires 4 arguments : x, y, width, height | |
- (id)imageAsCropped:(id)args | |
{ | |
[self ensureImageLoaded]; | |
if (image!=nil) | |
{ | |
ENSURE_ARG_COUNT(args,4); |
// modified version of https://github.com/pangratz/dnd-file-upload by pangratz | |
// modified by : kosso | |
// date : 06 November 2010 | |
// added some options for: | |
// allowMultiple | |
// allowedExtensions | |
// maximumFileSize | |
// also added dragEnter and dragLeave functions to enable change of appearance of the dropzone |
(function(j,q,u,e,r,y,R,o,x){try{o=jQuery;if(o&&(!R||(R&&o.fn.jquery==R))){x=true}}catch(er){}if(!x||(R&&o.fn.jquery!=R)){(q=j.createElement(q)).type='text/javascript';if(r){q.async=true}q.src='//ajax.googleapis.com/ajax/libs/jquery/'+(R||1)+'/jquery.min.js';u=j.getElementsByTagName(u)[0];q.onload=q.onreadystatechange=(function(){if(!e&&(!this.readyState||this.readyState=='loaded'||this.readyState=='complete')){e=true;x=jQuery;jQuery.noConflict(true)(function(){y(x)});q.onload=q.onreadystatechange=null;u.removeChild(q)}});u.appendChild(q)}else{y(o)}})(document,'script','head',false,false,(function($){$(function(){ | |
/* code goes here */ | |
console.log($.fn.jquery); | |
})})); | |
// readable: | |
(function (j, q, u, e, r, y, R, o, x ) { | |
// IE8 undefined crash fix | |
try { |
function escapeString(string) { | |
string = string.replace(/\\/g, "\\\\"). | |
replace(/\n/g, "\\n"). | |
replace(/\r/g, "\\r"). | |
replace(/\t/g, "\\t"); | |
if (string.indexOf("'") < 0) { | |
return "'" + string + "'"; | |
} | |
string = string.replace(/"/g, "\\\""); | |
return '"' + string + '"'; |
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
.
/* Kosso : March 12th 2011 | |
This the only way I managed to do this without the app crashing on resume. | |
Done slightly differently to the KS example, since they unregister the service and | |
do not use a setInterval timer. | |
*/ | |
//############ in app.js : | |
// test for iOS 4+ |
require.paths.unshift('/usr/local/lib/node/socket.io/lib/socket.io/transports'); | |
var htmlfile = require('htmlfile') | |
, flashsocket = require('flashsocket') | |
, jsonppolling = require('jsonp-polling') | |
, websocket = require('websocket') | |
, xhrmultipart = require('xhr-multipart') | |
, xhrpolling = require('xhr-polling'); | |
var http = require('http') | |
, io = require('socket.io'); |
var http = require('http') | |
, parse = require('url').parse | |
, StringDecoder = require('string_decoder').StringDecoder; | |
var LIMIT = 10 * 1024; | |
var request = function(url, body, func) { | |
if (typeof url !== 'object') { | |
url = parse(url); | |
} |