This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> | |
<title> | |
Find storkreds | |
</title> | |
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a1/jquery.mobile-1.0a1.min.css" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
SuperWebApps.dk JSON API | |
@Jalal.Hejazi 2013 | |
cURL 'http://superwebapps.dk/?json=core.info&controller=core&dev=1' | |
{ | |
"status": "ok", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.browser.mobile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
css3finalize |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title> | |
WebApp.Offline.Editor | |
</title> | |
<script src="http://codemirror.net/lib/codemirror.js"> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download application dependency on the following components: | |
# * jQuery | |
# * JSrender (JavaScript Template Rendering for jQuery) | |
# * JSO (JavaScript OAuth 2 client) | |
# * Bootstrap CSS | |
# It can easily be installed by running the following script: | |
# $ sh install_dependencies.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://jsfiddle.net/jalalhejazi/wWPs5/ | |
$(function () { | |
//Add ul html to body | |
$('body').html('<ul id="results">'); | |
//Call JSONP to CORS SuperWebApps.dk/API REST.get | |
$.ajax({ | |
type: 'get', | |
dataType: "jsonp", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// please read before code any CORS: | |
// http://john.sh/blog/2011/6/30/cross-domain-ajax-expressjs-and-access-control-allow-origin.html | |
// http://stackoverflow.com/questions/7067966/how-to-allow-cors-in-express-nodejs | |
// | |
setHeaders = function (req,res,next) { | |
res.header("X-Powered-By","nodejs"); | |
// if ajax set access control |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var fs = require('fs'); | |
http.createServer(function(request, response) { | |
response.writeHead(200, { | |
'Content-Type': 'text/html' | |
}); | |
fs.readFile('index.html', function(err, content){ | |
response.write(content); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Response header info: | |
Access-Control-Allow-Origin:* | |
Content-Type:text/json | |
X-Powered-By:nodejs | |
*/ | |
var http = require('http'); | |
var fs = require('fs'); |