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
<?xml version="1.0" encoding="ISO-8859-1" ?> | |
<rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"> | |
<channel> | |
<title>Sun Feed</title> | |
<link>http://www.thesun.com</link> | |
<description>big stories</description> | |
<atom:link href="http://RSS-FEED-URL.com" rel="self" type="application/rss+xml"/> | |
<item> |
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
{ | |
"cmd": ["/usr/local/bin/node ${file}"], | |
"selector": "source.js", | |
"shell": true, | |
"quiet": true | |
} |
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 sys = require('util'); | |
var exec = require('child_process').exec; | |
var puts = function puts(error, stdout, stderr) { | |
var out = stdout.split('\n'); | |
if(out[2].slice(0, 8) === 'Finished') { | |
console.log(out[3]); | |
}else { | |
console.log(stdout); |
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
{ | |
"article": { | |
"headline": "Girls Aloud", | |
"headlineSpan": 1, | |
"hideHeadline": false, | |
"type": "article", | |
"articleCoverPageWidth": 1, | |
"copy": "<p> The men who carried out the brutal killing of a soldier in London yesterday are British citizens of Nigerian background who converted to a radical form of Islam, sources have confirmed. But it is understood that the men, who are being treated in separate hospitals while under arrest, are not thought to have links</p>", | |
"publishDate": "2012-11-19T14:28:11Z", | |
"style": "Sun_Main_Article", |
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 app = require('express').createServer(); | |
app.get('/', function(req, res){ | |
res.send('hello world'); | |
}); | |
app.get('/:name', function(req, res){ | |
res.send('hello ' + req.param.name); | |
}); |
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 sayHi = function() { | |
return 'Hi'; | |
}; | |
if(typeof exports === 'object'){ | |
exports.sayHi = sayHi; | |
} else { | |
// your browser export | |
} |
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
/** | |
* Module dependencies. | |
*/ | |
var express = require('express'); | |
var http = require('http'); | |
var path = require('path'); | |
var app = express(); |
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 frax = function(context, next) { | |
if(!context.init) { | |
$.get(context.canonicalPath+'?_pjax=true', function(markup) { | |
if(context.delay) { | |
context.pending = markup; | |
}else { | |
context.container.html(markup); // cached $('#container') | |
} | |
next(); | |
}); |
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 _blend = function(req, res, next) { | |
res.blend = function(params) { | |
params.buildData(params.params, function(e, d) { | |
if(req.headers['content-type'] === 'application-json') { | |
res.json(d); | |
} else { // render html | |
params.buildSelectors(d, function(selectors) { | |
if(req.headers['content-type'] === 'sizlate') { | |
var options = { |